forked from hunvreus/hunvreus.github.com
/
.htaccess
34 lines (28 loc) · 998 Bytes
/
.htaccess
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Migrated from `date` to `pretty` permalink structure.
RewriteEngine On
# Directory index is never accessible.
#
# /index.html -> /
# /foo/index.html -> /foo/
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_URI} ^\/.*index\.html$
RewriteRule ^(.*)index.html$ http://teddy.fr/$1 [R=301,L]
# Continue to support deprecated permalink structure.
#
# /2009/09/09/foo.html -> /2009/09/09/foo/
RewriteCond %{REQUEST_URI} \/\d{4}\/\d{2}\/\d{2}\/.+\.html$
RewriteRule (.+).html$ http://teddy.fr/$1/ [R=301,L]
# Append trailing slash to directories.
# Borrowed from http://gist.github.com/97822
#
# /foo -> /foo/
RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{REQUEST_FILENAME} !/$
RewriteRule ^(.*)$ http://teddy.fr/$1/ [R=301,L]
# Compress static assets
SetOutputFilter DEFLATE
AddOutputFilterByType DEFLATE text/html application/xml text/css text/javascript
# Pretty error page
ErrorDocument 404 http://teddy.fr/404-not-found/
# Mime types
AddType application/x-woff woff