Created
April 21, 2014 14:01
-
-
Save bu-s/11143601 to your computer and use it in GitHub Desktop.
Basic .htaccess LAMP stack
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Etags | |
# NOTE: You can add/or remove additional file types to suite you requirements. | |
<FilesMatch "\.(ico|icon|pdf|flv|jpg|jpeg|png|gif|js|css|swf)(\.gz)?$"> | |
Header set Expires "Thu, 15 Apr 2016 20:00:00 GMT" | |
Header unset ETag | |
FileETag None | |
</FilesMatch> | |
# Gzip | |
<ifmodule mod_deflate.c> | |
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript text/javascript | |
</ifmodule> | |
#End Gzip | |
# Custom 404 page | |
# NOTE: I often use this with static sites so I usually define my custom error pages myself here. Add custom pages to handle 500 or 403 in this manner too. | |
ErrorDocument 404 /404.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a basic ".htaccess" file configuration that I use on small static websites.
I am a Web Designer and Illustrator with a focus on UX, IA and the visual design side of Web Design. I appreciate that this may not be the best or most economical configuration. If you have any comments or advice to improve it I would be grateful.