FernandoBatels/blitz-framework/master/.htaccess - Htaccess File

FernandoBatels/blitz-framework/master/.htaccess

<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html
    AddOutputFilterByType DEFLATE text/xml
    AddOutputFilterByType DEFLATE text/css
    AddOutputFilterByType DEFLATE text/javascript
    AddOutputFilterByType DEFLATE text/json
    AddOutputFilterByType DEFLATE application/xml
    AddOutputFilterByType DEFLATE application/xhtml+xml          
    AddOutputFilterByType DEFLATE application/rss+xml
    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE application/x-javascript   
    AddOutputFilterByType DEFLATE application/json   
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4.0[678] no-gzip
    BrowserMatch bMSIE !no-gzip !gzip-only-text/html
</IfModule> 
<IfModule mod_headers.c>
    Header append Vary User-Agent
</IfModule> 
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType text/html "access plus 0 seconds"
    ExpiresByType text/xml "access plus 0 seconds"
    ExpiresByType application/xml "access plus 0 seconds"
    ExpiresByType application/json "access plus 0 seconds"
    ExpiresByType application/rss+xml "access plus 1 hour"
    ExpiresByType image/vnd.microsoft.icon "access plus 1 week"
    ExpiresByType image/gif "access plus 1 week"
    ExpiresByType image/png "access plus 1 week"
    ExpiresByType image/jpg "access plus 1 week"
    ExpiresByType image/jpeg "access plus 1 week"
    ExpiresByType video/ogg "access plus 1 week"
    ExpiresByType audio/ogg "access plus 1 week"
    ExpiresByType video/mp4 "access plus 1 week"
    ExpiresByType video/webm "access plus 1 week"
    ExpiresByType font/truetype "access plus 1 year"
    ExpiresByType font/opentype "access plus 1 year"
    ExpiresByType font/woff "access plus 1 year"
    ExpiresByType image/svg+xml "access plus 1 year"
    ExpiresByType text/css "access plus 3 days"
    ExpiresByType application/javascript "access plus 3 days"
    ExpiresByType text/javascript "access plus 3 days"

    AddType application/vnd.ms-fontobject .eot
    AddType font/ttf .ttf
    AddType font/otf .otf
    <FilesMatch ".(ttf|otf|eot)$">
        <IfModule mod_headers.c>
            Header set Access-Control-Allow-Origin "*"
        </IfModule>
    </FilesMatch>
</IfModule>

#php_value upload_max_filesize 10000000000
#php_value post_max_size 10000000000

RewriteEngine On

# Allow access to assets folder from plugins folders
RewriteRule ^app/views/assets - [L]
RewriteRule ^app/storage/public - [L]

# forbid access to files and folders under app and vendor
RewriteRule ^app/.*$ - [L,F]
RewriteRule ^vendor/.*$ - [L,F]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+).(d+).(js|css|png|jpg|gif)$ $1.$3 [L]

RewriteRule ^(.*)$ index.php?r=$1 [QSA,L]

DirectoryIndex index.php ../index.php

On Github License

Files

Download PDF of Htaccess file
DEFLATE, no-gzip, REQUEST_FILENAME

Comments

Apache