This repository has been archived by the owner on Nov 21, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
81 lines (73 loc) · 3.04 KB
/
.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#<Files ~ "/site">
# Order allow,deny
# Deny from all
#</Files>
<Files ~ ".desc">
Order allow,deny
Deny from all
</Files>
<Files ~ ".section">
Order allow,deny
Deny from all
</Files>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^(root.php)
RewriteRule ^p/kudos index.php?page=kudos
RewriteRule ^p/about index.php?page=about
RewriteRule ^p/books index.php?page=books
RewriteRule ^p/archive/month/([^/]+) index.php?month=$1
RewriteRule ^p/archive/([^/]+)/([^/]+) index.php?page=archive&year=$1&month=$2
RewriteRule ^p/archive/([^/]+) index.php?page=archive&year=$1
RewriteRule ^p/archive index.php?page=archive
# RewriteRule ^page/error/([^/]+)/ index.php?section=error&page=$1
# RewriteRule ^page/viewlog/hitsperdate/([^/]+)/([^/]+)/ index.php?action=viewlog&logaction=hitsperdate&date=$1&offset=$2
# RewriteRule ^page/viewlog/hitsperdate/([^/]+)/ index.php?action=viewlog&logaction=hitsperdate&date=$1
# RewriteRule ^page/viewlog/([^/]+)/([^/]+) index.php?action=viewlog&logaction=$1&offset=$2
# RewriteRule ^page/viewlog/([^/]+)/ index.php?action=viewlog&logaction=$1
# RewriteRule ^page/viewlog index.php?action=viewlog
# RewriteRule ^viewimage/thumb/(.*) image.php?action=makethumb&filename=$1
# RewriteRule ^viewimage/gallery/thumb/([^/]+)/([0-9]+)/ index.php?action=makethumb&kind=gallery&gallery=$1&file=$2
# RewriteRule ^gallery/([^/]+)/([0-9]+)/ index.php?action=viewgallery&gallery=$1&file=$2
# RewriteRule ^page/([^/]+)/([^/]+) index.php?section=$1&page=$2
RewriteRule ^p/([^/]+) index.php?rantid=$1
RewriteRule ^p/ http://dammit.nl/
RewriteRule ^m/([^/]+)/([^/]+) blogmarks.php?year=$1&month=$2
RewriteRule ^m/([^/]+) blogmarks.php?year=$1
RewriteRule ^m$ blogmarks.php
RewriteRule ^search/([^/]+) search.php?searchkey=$1
RewriteRule ^search search.php
</IfModule>
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresByType image/svg+xml "access 1 month"
ExpiresByType application/x-font-woff "access 1 month"
#ExpiresDefault "access 2 days"
#ExpiresDefault "access 7 days"
</IfModule>
## EXPIRES CACHING ##
####################
# GZIP COMPRESSION #
####################
SetOutputFilter DEFLATE
AddOutputFilterByType DEFLATE text/html text/css text/plain text/xml application/x-javascript application/x-httpd-php
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip
<IfModule mod_headers.c>
Header append Vary User-Agent env=!dont-vary
</IfModule>
# http://stackoverflow.com/questions/13233810/etags-misconfigured
FileETag none