MpStyle/dev.me/master/.htaccess - Htaccess File

MpStyle/dev.me/master/.htaccess

#http://samaxes.com/2009/01/more-on-compressing-and-caching-your-site-with-htaccess/

<Files  ~ ".(view.php|htaccess)$">
  Order allow,deny
  Deny from all
</Files>
<Files  ~ "web/masterpages/$">
  Order allow,deny
  Deny from all
</Files>

Options -MultiViews
RewriteEngine On
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^.]+)$ $1.php [NC,L]
RewriteRule ^$ Home.php [NC,L]

<ifModule mod_deflate.c>
  <filesMatch ".(css|js|x?html?|php)$">
    SetOutputFilter DEFLATE
  </filesMatch>
</ifModule>

# BEGIN Expire headers
<ifModule mod_expires.c>
  ExpiresActive On
  ExpiresDefault "access plus 1 seconds"
  ExpiresByType image/x-icon "access plus 2592000 seconds"
  ExpiresByType image/jpeg "access plus 2592000 seconds"
  ExpiresByType image/png "access plus 2592000 seconds"
  ExpiresByType image/gif "access plus 2592000 seconds"
  ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds"
  ExpiresByType text/css "access plus 604800 seconds"
  ExpiresByType text/javascript "access plus 216000 seconds"
  ExpiresByType application/javascript "access plus 216000 seconds"
  ExpiresByType application/x-javascript "access plus 216000 seconds"
  ExpiresByType text/html "access plus 600 seconds"
  ExpiresByType application/xhtml+xml "access plus 600 seconds"
</ifModule>
# END Expire headers

# BEGIN Cache-Control Headers
<ifModule mod_headers.c>
#  <filesMatch ".(ico|jpe?g|png|gif|swf)$">
#    Header set Cache-Control "max-age=2592000, public"
#  </filesMatch>
  <filesMatch "^vendor/[^.]+.(css)$">
    Header set Cache-Control "max-age=604800, public"
  </filesMatch>
  <filesMatch "^vendor/[^.]+.min.(css)$">
    Header set Cache-Control "max-age=604800, public"
  </filesMatch>
  <filesMatch "^components/[^.]+.min.(css)$">
    Header set Cache-Control "max-age=604800, public"
  </filesMatch>
  <filesMatch "^vendor/[^.]+.min.(js)$">
    Header set Cache-Control "max-age=216000, private"
  </filesMatch>
  <filesMatch "^components/[^.]+.min.(js)$">
    Header set Cache-Control "max-age=216000, private"
  </filesMatch>
#  <filesMatch ".(x?html?|php)$">
#    Header set Cache-Control "max-age=600, private, must-revalidate"
#  </filesMatch>
</ifModule>
# END Cache-Control Headers

# BEGIN Turn ETags Off
<ifModule mod_headers.c>
  Header unset ETag
</ifModule>
FileETag None
# END Turn ETags Off
 
# BEGIN Remove Last-Modified Header
<ifModule mod_headers.c>
  Header unset Last-Modified
</ifModule>
# END Remove Last-Modified Header

On Github License

Files

Download PDF of Htaccess file
DEFLATE, REQUEST_FILENAME

Comments

Apache