Skip to content

[Website]: Redirect existing docs from https://arrow.apache.org/ to https://datafusion.apache.org/#502

Closed
alamb wants to merge 8 commits intoapache:mainfrom
alamb:alamb/redirect
Closed

[Website]: Redirect existing docs from https://arrow.apache.org/ to https://datafusion.apache.org/#502
alamb wants to merge 8 commits intoapache:mainfrom
alamb:alamb/redirect

Conversation

@alamb
Copy link
Contributor

@alamb alamb commented Apr 23, 2024

gem "jekyll-feed", "~> 0.6"
gem "jekyll-jupyter-notebook"
gem "jekyll-seo-tag"
gem 'jekyll-redirect-from'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not really familiar with Jekyll and thus I don't know if this is the right approach or not for creating a redirect 🤔 It seems to work but has lots of repeititon

Ideally I would like to just make a table with old URLs and redirects but I couldn't figure out how to do that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kou I think you are a Jekyll expert (at least are more knowledgable than I am) -- is this a reasonable way to implement redirects for the arrow-site? Or is there a better / preferred way?

@@ -0,0 +1,94 @@
# Creates redirect URLS
Copy link
Contributor Author

@alamb alamb Apr 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the script I used to create the content in this PR -- in case anyone is interested

@alamb alamb changed the title [WEBSITE]: Redirect existing docs from https://arrow.apache.org/ to https://datafusion.apache.org/ [Website]: Redirect existing docs from https://arrow.apache.org/ to https://datafusion.apache.org/ Apr 23, 2024
Copy link

@phillipleblanc phillipleblanc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me - thanks for taking this on! One minor nit, but its very minor so feel free to ignore.

Co-authored-by: Phillip LeBlanc <phillip@leblanc.tech>
Copy link
Contributor Author

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review @phillipleblanc

gem "jekyll-feed", "~> 0.6"
gem "jekyll-jupyter-notebook"
gem "jekyll-seo-tag"
gem 'jekyll-redirect-from'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kou I think you are a Jekyll expert (at least are more knowledgable than I am) -- is this a reasonable way to implement redirects for the arrow-site? Or is there a better / preferred way?

@kou
Copy link
Member

kou commented Apr 23, 2024

It seems that we can use .htaccess: https://infra.apache.org/project-site.html (See the "Custom website directives using .htaccess files" section)

How about trying .htaccess?

diff --git a/.htaccess b/.htaccess
new file mode 100644
index 00000000000..e19ec2a4fbd
--- /dev/null
+++ b/.htaccess
@@ -0,0 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+Redirect permanent /datafusion/ https://datafusion.apache.org/

@alamb
Copy link
Contributor Author

alamb commented Apr 23, 2024

How about trying .htaccess?

Thanks @kou -- I will give it a try

@alamb alamb marked this pull request as draft April 24, 2024 15:16
@kou kou closed this in #505 Apr 25, 2024
kou pushed a commit that referenced this pull request Apr 25, 2024
…sion to https://datafusion.apache.org/ (#505)

Closes apache/datafusion#10194
Closes #502

Per @kou 's suggestion in
#502 (comment),
this PR adds a `.htaccess` file with a redirect from all
`www.apache.org/datafusion` urls to `datadfusion.apache.org` urls (I
think)

Documentaiton on these files is here:
https://infra.apache.org/project-site.html

I don't really know how to test this other than "in production"
@alamb alamb deleted the alamb/redirect branch April 25, 2024 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Redirect existing docs from https://arrow.apache.org/ to https://datafusion.apache.org/ Old URL for CLI docs page is showing 404

3 participants