aviormusic/avior.audio/master/.htaccess - Htaccess File


# Adding WebApplication capability support
AddType text/cache-manifest .appcache

# Disable directory listing
Options -Indexes

# Redirect all requests to the Index file
# excepting images and other media types
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !.(png|jpg|gif|appcache|json|css|js)$
RewriteRule . index.php [L]

# Gzipping content for speed optimization
<ifModule mod_gzip.c>
    mod_gzip_on Yes
    mod_gzip_dechunk Yes
    mod_gzip_item_include file .(html?|txt|css|js)$
    mod_gzip_item_include handler ^cgi-script$
    mod_gzip_item_include mime ^text/.*
    mod_gzip_item_include mime ^application/x-javascript.*
    mod_gzip_item_exclude mime ^image/.*
    mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*

# Adding the browser caching ability
<ifModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault "access plus 5 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"

# Adding HTTP Cache control headers
<ifModule mod_headers.c>
    <filesMatch ".(ico|jpe?g|png|gif|swf)$">
        Header set Cache-Control "public"
    <filesMatch ".(css)$">
        Header set Cache-Control "public"
    <filesMatch ".(js)$">
        Header set Cache-Control "private"
    <filesMatch ".(x?html?|php)$">
        Header set Cache-Control "private, must-revalidate"

<Files ".htaccess">
    Order Deny,Allow
    Deny from all
    Allow from localhost

On Github License


Download PDF of Htaccess file