Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data: Add RedirectMatch for ccEngine bug URLs #191

Merged
merged 1 commit into from
Apr 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions config/language-redirects
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# 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:
Expand All @@ -17,8 +17,8 @@ RewriteCond %{REQUEST_URI} ^/(licenses|publicdomain)
RewriteCond $1 [A-Z]
RewriteRule ^/?(.*)$ /${lowercase:$1} [R=301,L]

########################################
#Step 2: Redirect alternate language codes to supported Django language codes
###############################################################################
# Step 2: Redirect alternate language codes to supported Django language codes

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"
Expand Down Expand Up @@ -365,6 +365,7 @@ RedirectMatch 301 "^/licenses/by/4[.]0/deed[.]pt[@_]br(?:[.]html)?$"
RedirectMatch 301 "^/licenses/by/4[.]0/deed[.]es[@_-]es(?:[.]html)?$" "/licenses/by/4.0/deed.es"
RedirectMatch 301 "^/licenses/by/4[.]0/deed[.]en[@_-]us(?:[.]html)?$" "/licenses/by/4.0/deed.en"
RedirectMatch 301 "^/licenses/by/4[.]0/deed[.]en[@_-]gb(?:[.]html)?$" "/licenses/by/4.0/deed.en"
RedirectMatch 301 "^/licenses/by/4[.]0/([^/]+)/(deed|legalcode)(?:[.]html)?$" "/licenses/by/4.0/$2.$1"
RedirectMatch 301 "^/licenses/by/3[.]0/za/legalcode[.]en[@_]gb(?:[.]html)?$" "/licenses/by/3.0/za/legalcode.en-gb"
RedirectMatch 301 "^/licenses/by/3[.]0/za/deed[.]zh[@_-]tw(?:[.]html)?$" "/licenses/by/3.0/za/deed.zh-hant"
RedirectMatch 301 "^/licenses/by/3[.]0/za/deed[.]zh[@_-]cn(?:[.]html)?$" "/licenses/by/3.0/za/deed.zh-hans"
Expand Down Expand Up @@ -1355,6 +1356,7 @@ RedirectMatch 301 "^/licenses/by-sa/4[.]0/deed[.]pt[@_]br(?:[.]html)?$"
RedirectMatch 301 "^/licenses/by-sa/4[.]0/deed[.]es[@_-]es(?:[.]html)?$" "/licenses/by-sa/4.0/deed.es"
RedirectMatch 301 "^/licenses/by-sa/4[.]0/deed[.]en[@_-]us(?:[.]html)?$" "/licenses/by-sa/4.0/deed.en"
RedirectMatch 301 "^/licenses/by-sa/4[.]0/deed[.]en[@_-]gb(?:[.]html)?$" "/licenses/by-sa/4.0/deed.en"
RedirectMatch 301 "^/licenses/by-sa/4[.]0/([^/]+)/(deed|legalcode)(?:[.]html)?$" "/licenses/by-sa/4.0/$2.$1"
RedirectMatch 301 "^/licenses/by-sa/3[.]0/za/legalcode[.]en[@_]gb(?:[.]html)?$" "/licenses/by-sa/3.0/za/legalcode.en-gb"
RedirectMatch 301 "^/licenses/by-sa/3[.]0/za/deed[.]zh[@_-]tw(?:[.]html)?$" "/licenses/by-sa/3.0/za/deed.zh-hant"
RedirectMatch 301 "^/licenses/by-sa/3[.]0/za/deed[.]zh[@_-]cn(?:[.]html)?$" "/licenses/by-sa/3.0/za/deed.zh-hans"
Expand Down Expand Up @@ -2345,6 +2347,7 @@ RedirectMatch 301 "^/licenses/by-nd/4[.]0/deed[.]pt[@_]br(?:[.]html)?$"
RedirectMatch 301 "^/licenses/by-nd/4[.]0/deed[.]es[@_-]es(?:[.]html)?$" "/licenses/by-nd/4.0/deed.es"
RedirectMatch 301 "^/licenses/by-nd/4[.]0/deed[.]en[@_-]us(?:[.]html)?$" "/licenses/by-nd/4.0/deed.en"
RedirectMatch 301 "^/licenses/by-nd/4[.]0/deed[.]en[@_-]gb(?:[.]html)?$" "/licenses/by-nd/4.0/deed.en"
RedirectMatch 301 "^/licenses/by-nd/4[.]0/([^/]+)/(deed|legalcode)(?:[.]html)?$" "/licenses/by-nd/4.0/$2.$1"
RedirectMatch 301 "^/licenses/by-nd/3[.]0/za/legalcode[.]en[@_]gb(?:[.]html)?$" "/licenses/by-nd/3.0/za/legalcode.en-gb"
RedirectMatch 301 "^/licenses/by-nd/3[.]0/za/deed[.]zh[@_-]tw(?:[.]html)?$" "/licenses/by-nd/3.0/za/deed.zh-hant"
RedirectMatch 301 "^/licenses/by-nd/3[.]0/za/deed[.]zh[@_-]cn(?:[.]html)?$" "/licenses/by-nd/3.0/za/deed.zh-hans"
Expand Down Expand Up @@ -3373,6 +3376,7 @@ RedirectMatch 301 "^/licenses/by-nc/4[.]0/deed[.]pt[@_]br(?:[.]html)?$"
RedirectMatch 301 "^/licenses/by-nc/4[.]0/deed[.]es[@_-]es(?:[.]html)?$" "/licenses/by-nc/4.0/deed.es"
RedirectMatch 301 "^/licenses/by-nc/4[.]0/deed[.]en[@_-]us(?:[.]html)?$" "/licenses/by-nc/4.0/deed.en"
RedirectMatch 301 "^/licenses/by-nc/4[.]0/deed[.]en[@_-]gb(?:[.]html)?$" "/licenses/by-nc/4.0/deed.en"
RedirectMatch 301 "^/licenses/by-nc/4[.]0/([^/]+)/(deed|legalcode)(?:[.]html)?$" "/licenses/by-nc/4.0/$2.$1"
RedirectMatch 301 "^/licenses/by-nc/3[.]0/za/legalcode[.]en[@_]gb(?:[.]html)?$" "/licenses/by-nc/3.0/za/legalcode.en-gb"
RedirectMatch 301 "^/licenses/by-nc/3[.]0/za/deed[.]zh[@_-]tw(?:[.]html)?$" "/licenses/by-nc/3.0/za/deed.zh-hant"
RedirectMatch 301 "^/licenses/by-nc/3[.]0/za/deed[.]zh[@_-]cn(?:[.]html)?$" "/licenses/by-nc/3.0/za/deed.zh-hans"
Expand Down Expand Up @@ -4363,6 +4367,7 @@ RedirectMatch 301 "^/licenses/by-nc-sa/4[.]0/deed[.]pt[@_]br(?:[.]html)?$"
RedirectMatch 301 "^/licenses/by-nc-sa/4[.]0/deed[.]es[@_-]es(?:[.]html)?$" "/licenses/by-nc-sa/4.0/deed.es"
RedirectMatch 301 "^/licenses/by-nc-sa/4[.]0/deed[.]en[@_-]us(?:[.]html)?$" "/licenses/by-nc-sa/4.0/deed.en"
RedirectMatch 301 "^/licenses/by-nc-sa/4[.]0/deed[.]en[@_-]gb(?:[.]html)?$" "/licenses/by-nc-sa/4.0/deed.en"
RedirectMatch 301 "^/licenses/by-nc-sa/4[.]0/([^/]+)/(deed|legalcode)(?:[.]html)?$" "/licenses/by-nc-sa/4.0/$2.$1"
RedirectMatch 301 "^/licenses/by-nc-sa/3[.]0/za/legalcode[.]en[@_]gb(?:[.]html)?$" "/licenses/by-nc-sa/3.0/za/legalcode.en-gb"
RedirectMatch 301 "^/licenses/by-nc-sa/3[.]0/za/deed[.]zh[@_-]tw(?:[.]html)?$" "/licenses/by-nc-sa/3.0/za/deed.zh-hant"
RedirectMatch 301 "^/licenses/by-nc-sa/3[.]0/za/deed[.]zh[@_-]cn(?:[.]html)?$" "/licenses/by-nc-sa/3.0/za/deed.zh-hans"
Expand Down Expand Up @@ -5353,6 +5358,7 @@ RedirectMatch 301 "^/licenses/by-nc-nd/4[.]0/deed[.]pt[@_]br(?:[.]html)?$"
RedirectMatch 301 "^/licenses/by-nc-nd/4[.]0/deed[.]es[@_-]es(?:[.]html)?$" "/licenses/by-nc-nd/4.0/deed.es"
RedirectMatch 301 "^/licenses/by-nc-nd/4[.]0/deed[.]en[@_-]us(?:[.]html)?$" "/licenses/by-nc-nd/4.0/deed.en"
RedirectMatch 301 "^/licenses/by-nc-nd/4[.]0/deed[.]en[@_-]gb(?:[.]html)?$" "/licenses/by-nc-nd/4.0/deed.en"
RedirectMatch 301 "^/licenses/by-nc-nd/4[.]0/([^/]+)/(deed|legalcode)(?:[.]html)?$" "/licenses/by-nc-nd/4.0/$2.$1"
RedirectMatch 301 "^/licenses/by-nc-nd/3[.]0/za/legalcode[.]en[@_]gb(?:[.]html)?$" "/licenses/by-nc-nd/3.0/za/legalcode.en-gb"
RedirectMatch 301 "^/licenses/by-nc-nd/3[.]0/za/deed[.]zh[@_-]tw(?:[.]html)?$" "/licenses/by-nc-nd/3.0/za/deed.zh-hant"
RedirectMatch 301 "^/licenses/by-nc-nd/3[.]0/za/deed[.]zh[@_-]cn(?:[.]html)?$" "/licenses/by-nc-nd/3.0/za/deed.zh-hans"
Expand Down