HTTPArchive/httparchive/master/.htaccess - Htaccess File

HTTPArchive/httparchive/master/.htaccess

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

On Github License

Files

Download PDF of Htaccess file
DEFLATE

Comments

Apache