b23841fb4e9e691abf8613fcc0d0fab4e96d2745
[sheet.git] / .htaccess
1 Options        -MultiViews
2 DirectoryIndex index.plp
3 DirectorySlash Off
4
5 RewriteEngine  on
6 RewriteBase    /
7
8 # redirect from old vim-only subdomain
9 RewriteCond %{HTTP_HOST}             ^vim?\.shiar\.\w+$
10 RewriteRule ^(vi(?=m$)|.*)           http://sheet.shiar.nl/$1 [R=301]
11
12 # redirect old locations
13 RewriteRule ^vim$                    /vi [R=301]
14 RewriteRule ^cc$                     /countries [R=301]
15
16 # serve vim commands when requesting /digraphs.ex as well
17 RewriteRule    ^(digraphs)\.ex(/.*)?$ $1.vim$2
18
19 # add .plp if a file exists with .plp appended (topdir only)
20 RewriteCond    %{REQUEST_FILENAME}     !-f
21 RewriteCond    %{DOCUMENT_ROOT}/$1.plp  -f
22 RewriteRule    ^/*([^/]+)(.*)           $1.plp$2
23
24 # allow browsers to cache for upto a month
25 <IfModule headers_module>
26 <FilesMatch "\.(?:css|js|json)$">
27 Header set Cache-Control "max-age=2592000"
28 Header set Access-Control-Allow-Origin "*"
29 </FilesMatch>
30 </IfModule>
31