diff --git a/config/language-redirects b/config/language-redirects index 1df8b69d21f..3d69f0cab26 100644 --- a/config/language-redirects +++ b/config/language-redirects @@ -3,22 +3,14 @@ # This file was generated by the publish command. # https://github.com/creativecommons/cc-legal-tools-app # -# It should be included from within an Apache2 httpd site config -# -# https://httpd.apache.org/docs/2.4/mod/mod_alias.html -# https://httpd.apache.org/docs/2.4/mod/mod_rewrite.html - -############################################################################### -# Step 1: Redirect mixed/uppercase to lowercase -# -# Must be set within virtual host context: -RewriteMap lowercase int:tolower -RewriteCond %{REQUEST_URI} ^/(licenses|publicdomain) -RewriteCond $1 [A-Z] -RewriteRule ^/?(.*)$ /${lowercase:$1} [R=301,L] +# See related Apache2 httpd documentation: +# - https://httpd.apache.org/docs/2.4/mod/mod_alias.html +# - https://httpd.apache.org/docs/2.4/mod/mod_rewrite.html ############################################################################### -# Step 2: Redirect alternate language codes to supported Django language codes +# Step 1: Langauge redirects +# - Redirect alternate language codes to supported Django language codes +# - Redirect legacy bug URLs to valid URLs RedirectMatch 301 "^/publicdomain/zero/1[.]0/legalcode[.]zh[@_-]tw(?:[.]html)?$" "/publicdomain/zero/1.0/legalcode.zh-hant" RedirectMatch 301 "^/publicdomain/zero/1[.]0/legalcode[.]zh[@_-]cn(?:[.]html)?$" "/publicdomain/zero/1.0/legalcode.zh-hans"