PDavid commented on code in PR #12:
URL: https://github.com/apache/hbase-site/pull/12#discussion_r3129523656
##########
.htaccess:
##########
@@ -1,7 +1,18 @@
+# Redirect old HTML pages to new extensionless URLs
+Redirect permanent /coc.html /code-of-conduct
+Redirect permanent /export_control.html /export-control
+Redirect permanent /poweredbyhbase.html /powered-by-hbase
+Redirect permanent /old_news.html /news
+
+# For downloads, acid-semantics, sponsors pages
+RewriteEngine On
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteRule ^(.+)\.html$ /$1 [R=301,L]
Review Comment:
Try to redirect requests for old pages to new ones:
- 4 explicit redirects for renamed pages: coc.html → /code-of-conduct,
export_control.html → /export-control, poweredbyhbase.html → /powered-by-hbase,
old_news.html → /news
- 1 generic rewrite rule that handles the 2 same-name pages
(acid-semantics.html → /acid-semantics, downloads.html → /downloads,
sponsors.html → /sponsors) - it only fires when the .html file no longer exists
on disk
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]