dfurber/m/master/public/.htaccess - Htaccess File


# Otherwise no permission to do anything here...
Order allow,deny
Allow from all
Options +FollowSymLinks

AddType application/x-xpinstall .xpi
AddType text/xml .rdf

# This works with rails asset tag helper to add far future expires headers to static assets
<FilesMatch ".(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Cache-Control "public"
ExpiresActive On
ExpiresDefault "access plus 1 year"

# This gzips the output of non-image files
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/x-javascript

# This turns off the image toolbar in IE
Header set imagetoolbar "no"

# This unsets etags, which tend to be useless on dynamic websites - instead we are setting far-future expires headers on static assets
Header unset Etag
FileETag none

# Passenger Config
RailsEnv production
RailsBaseURI /
# PassengerAppRoot /var/www/clients/client9/web15/current

# This preps the url for rails dispatcher. The .svn line prevents those files from showing, although they should be deleted by deploy script.
RewriteEngine On
RewriteRule ^(.*/)?.svn/ - [F,L]
RewriteRule (.*)-cbd+.(.*)$ $1.$2 [L]

# If you see these messages it means Rails isn't working, and it's usually a permissions issue or a SystemExit error that 
# shuts Rails down before it finishes processing the request.
ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly"
ErrorDocument 403 "Access Forbidden"

On Github License


Download PDF of Htaccess file
DEFLATE, static