-
Notifications
You must be signed in to change notification settings - Fork 56
/
.htaccess
120 lines (93 loc) · 4.25 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/css application/json application/javascript text/xml application/xml text/x-component
<FilesMatch "\.(ttf|otf|eot|svg)$" >
SetOutputFilter DEFLATE
</FilesMatch>
</IfModule>
FileETag none
AddType application/javascript;charset=UTF-8 .js
AddType text/css;charset=UTF-8 .css
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType text/css "access plus 1 year"
ExpiresByType application/javascript "access plus 1 year"
ExpiresByType image/x-icon "access plus 1 year"
</IfModule>
<Files .git*>
order allow,deny
deny from all
</Files>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^@$ http://twitter.com/jsperf [R=301,L]
# If running a local copy of jsPerf please feel free to prune these redirects
RewriteRule ^dart-disclaimer http://jsperf.com/dart [R=301,L]
RewriteRule ^document-head-speed-test$ http://jsperf.com/document-head [R=301,L]
RewriteRule ^testing$ http://jsperf.com/accessing-dom-elements [R=301,L]
RewriteRule ^array-creating http://jsperf.com/literal-vs-constructor-array [R=301,L]
RewriteRule ^jquery-each2-vs-quickeach-vs-each http://jsperf.com/jquery-each-vs-quickeach/2 [R=301,L]
RewriteRule ^equlity-operators-with-the-same-types http://jsperf.com/equality-operators-with-the-same-types [R=301,L]
RewriteRule ^math-min-a-b-vs-a-b-a-b http://jsperf.com/math-vs-greater-than [R=301,L]
RewriteRule ^remove-all-child-nodes http://jsperf.com/removechildren/3 [R=301,L]
RewriteCond %{HTTP_HOST} !^jsperf.com|^a\.jsperf.com|^dev\.jsperf.com$ [NC]
RewriteRule ^(.*)$ http://jsperf.com%{REQUEST_URI} [R=301,L]
RewriteCond %{HTTP_HOST} ^a.jsperf.com$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*).css$ _css/main.css
RewriteCond %{HTTP_HOST} ^a.jsperf.com$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)-([0-9]+).js$ _js/$1.js
RewriteCond %{HTTP_HOST} ^a.jsperf.com$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*).js$ _js/$1.js
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^_css/([0-9]*).css$ _css/main.css
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^api/json$ _api/json.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^api/jsonp$ _api/jsonp.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^browse/([a-z0-9-]+).atom/?$ index.php?slug=browseAuthor&author=$1&atom=true [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^browse/([a-z0-9-]+)/?$ index.php?slug=browseAuthor&author=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^status/([0-9]{3})/?$ index.php?slug=status&action=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(edit|delete)-comment/([0-9]+)/?$ index.php?slug=$1Comment&id=$2 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z0-9-]+)/([0-9]+)/(edit|delete|publish|embed|dev)/?$ index.php?slug=$1&rev=$2&action=$3 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z0-9-]+)/([0-9]+).atom/?$ index.php?slug=$1&rev=$2&atom=true [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z0-9-]+)/([0-9]+)/?$ index.php?slug=$1&rev=$2 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z0-9-]+)/(edit|delete|publish|embed|dev)/?$ index.php?slug=$1&action=$2 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z0-9-]+).xml index.php?slug=$1.xml [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z0-9-]+).atom index.php?slug=$1&atom=true [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z0-9-]+)? index.php?slug=$1 [L,QSA]
</IfModule>
ErrorDocument 400 /status/400
ErrorDocument 403 /status/403
ErrorDocument 404 /status/404