forked from itchy/Dialyse-Webseite
Add multilingual support (DE default, EN under /en/)
This commit is contained in:
1 parent
01ea3bd07a
commit
1e33c525f1
21 files changed
+855
-443
No files matched your search
@@ -8,7 +8,18 @@ RewriteCond %{THE_REQUEST} \s/+index\.php[\s?] [NC]
|
||||
RewriteCond %{QUERY_STRING} ^$
|
||||
RewriteRule ^index\.php$ / [R=301,L]
|
||||
|
||||
# Clean URL routing for .html pages
|
||||
# Redirect /de/... to canonical root /... (German is the default language)
|
||||
RewriteRule ^de/?$ / [R=301,L]
|
||||
RewriteRule ^de/main\.html$ / [R=301,L]
|
||||
RewriteRule ^de/([0-9a-zA-Z\-]+)\.html$ /$1.html [R=301,L]
|
||||
|
||||
# English subpath routing (/en/ and /en/<page>.html)
|
||||
RewriteRule ^en/main\.html$ /en/ [R=301,L]
|
||||
RewriteRule ^en/?$ index.php?lang=en&action=main [QSA,L]
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^en/([0-9a-zA-Z\-]+)\.html$ index.php?lang=en&action=$1 [QSA,L]
|
||||
|
||||
# Clean URL routing for .html pages (German default)
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{QUERY_STRING} ([a-zA-Z0-9-_.=&+%]*)
|
||||
RewriteRule ^([0-9a-zA-Z\-]+).html$ index.php?action=$1&%1 [L]
|
||||
|
||||
Reference in new issue
Block a user