publiccode.si/site/static/.htaccess

18 lines
546 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 /sharepic to sharepic generator
#RewriteRule ^sharepic$ https://sharepic.fsfe.org/pmpc [R=301,L]
RewriteRule ^([a-z-]*/)?sharepics?/? https://sharepic.fsfe.org/pmpc [R=301,L]
# Redirect 404 errors to nice page
ErrorDocument 404 /404.html