Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View ntorga's full-sized avatar

Northon Torga ntorga

View GitHub Profile
<FilesMatch ".(ico|jpg|jpeg|png|gif|js|css|swf|pdf|flv|mp3)$">
<IfModule mod_expires.c>
ExpiresActive on
ExpiresDefault "access plus 5 year"
Header set Cache-Control "public"
</IfModule>
</FilesMatch>
<FilesMatch ".(html|htm|xml|txt|xsl)$">
Header set Cache-Control "max-age=7200, must-revalidate"
</FilesMatch>
<FilesMatch ".(htm|html|css|js)$">
AddDefaultCharset UTF-8
</FilesMatch>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</IfModule>
AddType application/octet-stream .pdf
AddType application/octet-stream .avi
AddType application/octet-stream .xls
order allow,deny
deny from 74.188.26.201
deny from 74.188.26.202
deny from 74.188.26.203
allow from all
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^subdirectory/(.*)$ /anotherdirectory/$1 [R=301,NC,L]
</IfModule>
DirectoryIndex home.html #to make home.html as index
ErrorDocument 400 /error/400.html
ErrorDocument 401 /error/401.html
ErrorDocument 403 /error/403.html
ErrorDocument 500 /error/500.html