forked from HTTPArchive/legacy.httparchive.org
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.htaccess
47 lines (36 loc) · 1.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
DirectoryIndex index.php
Options -Indexes
<FilesMatch "(\.inc|cachegen)">
order allow,deny
deny from all
</FilesMatch>
<FilesMatch "admin.php">
AuthType Basic
AuthUserFile /var/www/.htpasswd
AuthName "Restricted"
require valid-user
</FilesMatch>
<FilesMatch "query.php">
AuthType Basic
AuthUserFile /var/www/.htpasswd
AuthName "Restricted"
require valid-user
</FilesMatch>
# Compress/gzip html, XML, css and js and fonts and CSV
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript application/javascript font/ttf application/octet-stream
</IfModule>
# Add a far future Expires header to .gif, .jpg, .css and .js.
# TODO - Need to add a versioning system to resource URLs to make them cacheable.
<FilesMatch "\.(png|gif|jpg|js|css|ico)$">
ExpiresActive On
ExpiresDefault "access plus 7 days"
Header set ETag ""
</FilesMatch>
<FilesMatch "(trends|filmstrip|harviewer|interesting-images|runs|patchwork).js">
SetHandler application/x-httpd-php
Header set Content-Type "application/javascript"
</FilesMatch>
# earlier I handed out http://httparchive.org/dev/ and http://httparchive.org/beta/
RedirectMatch ^/dev/(.*)$ http://dev.httparchive.org/$1
RedirectMatch ^/beta/(.*)$ http://beta.httparchive.org/$1