publiccode.si/site/static/.htaccess

14 lines
359 B
ApacheConf
Raw Normal View History

2017-06-15 20:04:01 +02:00
RewriteEngine On
RewriteBase /
2017-06-15 20:04:01 +02:00
# redirect wrong language code we used before
RewriteRule ^zh_tw/?(.*)$ /zh-tw/$1 [L,R=301]
# redirect all requests to non-existing translations to EN
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^[a-z-]*/(.+) $1 [L,R=301]
# Redirect 404 errors to nice page
ErrorDocument 404 /404.html