aboutsummaryrefslogtreecommitdiff
path: root/website
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2017-06-12 22:30:06 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2017-06-13 00:15:32 +0200
commit1772fa9d86e66ab815186c125062ca74e5b35849 (patch)
tree395c36005e3636f24455502b906015d6fb90564c /website
parent3cf73930c3ba0c6da415ec487692e7f0cb5cfb3d (diff)
downloadlombok-1772fa9d86e66ab815186c125062ca74e5b35849.tar.gz
lombok-1772fa9d86e66ab815186c125062ca74e5b35849.tar.bz2
lombok-1772fa9d86e66ab815186c125062ca74e5b35849.zip
htaccess dynamically generated to canonicalize all web requests.
Diffstat (limited to 'website')
-rw-r--r--website/extra/htaccess43
1 files changed, 31 insertions, 12 deletions
diff --git a/website/extra/htaccess b/website/extra/htaccess
index fd34633f..815095b9 100644
--- a/website/extra/htaccess
+++ b/website/extra/htaccess
@@ -1,17 +1,36 @@
RewriteEngine On
-RewriteRule ^features/all$ /features/index.html [L,END]
-RewriteRule ^features/index(\.html)?$ /features/index.html [L,END]
-RewriteRule ^features/experimental/all$ /features/experimental/index.html [L,END]
-RewriteRule ^features/experimental/index(\.html)?$ /features/experimental/index.html [L,END]
-RewriteRule ^features/.*\.html$ - [L,END]
-RewriteRule ^features/(.*)$ /features/$1.html [L,END]
-RewriteRule ^features$ /features/index.html [L,END]
-RewriteRule ^features/experimental$ /features/experimental/index.html [L,END]
-RewriteRule ^changelog$ /changelog.html [L,END]
+
RewriteRule ^$ /main.html [L,END]
-RewriteRule ^index(\.html)?$ /main.html [L,END]
+RewriteRule ^(index|home)(\.html)?$ / [NC,RC=301]
+
+RewriteRule ^changelog$ /changelog.html [L,END]
+RewriteRule ^changelog(\.html)?$ /changelog [NC,R=301]
RewriteRule ^credits$ /credits.html [L,END]
+RewriteRule ^credits(\.html)?$ /credits [NC,R=301]
RewriteRule ^download$ /download.html [L,END]
+RewriteRule ^download(\.html)?$ /download [NC,R=301]
RewriteRule ^all-versions$ /all-versions.html [L,END]
-RewriteRule ^setup/.*\.html$ - [L,END]
-RewriteRule ^setup/(.*) /setup/$1.html [L,END]
+RewriteRule ^all-versions(\.html)?$ /all-versions [NC,R=301]
+
+<#list setupPages as pg>
+RewriteRule ^setup/${pg?no_esc}$ /setup/${pg?no_esc}.html [L,END]
+RewriteRule ^setup/${pg?no_esc}(\.html)?$ /setup/${pg?no_esc} [NC,R=301]
+</#list>
+
+RewriteRule ^features/all$ /features/index.html [L,END]
+RewriteRule ^features(/all)?$ /features/all [NC,R=301]
+RewriteRule ^features/index(\.html)?$ /features/all [NC,R=301]
+
+<#list featurePages as pg>
+RewriteRule ^features/${pg?no_esc}$ /features/${pg?no_esc}.html [L,END]
+RewriteRule ^features/${pg?no_esc}(\.html)?$ /features/${pg?no_esc} [NC,R=301]
+</#list>
+
+RewriteRule ^features/experimental/all$ /features/experimental/index.html [L,END]
+RewriteRule ^features/experimental(/all)?$ /features/experimental/all [NC,R=301]
+RewriteRule ^features/experimental/index(\.html)?$ /features/experimental/all [NC,R=301]
+
+<#list experimentalPages as pg>
+RewriteRule ^features/experimental/${pg?no_esc}$ /features/experimental/${pg?no_esc}.html [L,END]
+RewriteRule ^features/experimental/${pg?no_esc}(\.html)?$ /features/experimental/${pg?no_esc} [NC,R=301]
+</#list>