nikoz84/aew/master/public/.htaccess - Htaccess File

nikoz84/aew/master/public/.htaccess

RewriteEngine On
# The following rule tells Apache that if the requested filename
# exists, simply serve it.
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
# The following rewrites all other queries to index.php. The 
# condition ensures that if you are using Apache aliases to do
# mass virtual hosting, the base path will be prepended to 
# allow proper resolution of the index.php file; it will work
# in non-aliased environments as well, providing a safe, one-size 
# fits all solution.
RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::2$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteRule ^(.*)$ %{ENV:BASE}index.php [NC,L]
#Cache de arquivos  Cuidado em windows não funciona Investigar mais
ExpiresActive On
ExpiresDefault "access plus 1 day"
# Favicon
ExpiresByType image/x-icon "access plus 1 week"
# Midia: images, video, audio
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType video/ogg "access plus 1 month"
ExpiresByType audio/ogg "access plus 1 month"
ExpiresByType video/mp4 "access plus 1 month"
ExpiresByType video/webm "access plus 1 month"
# Fonts 
ExpiresByType application/x-font-ttf "access plus 1 month"
ExpiresByType font/opentype "access plus 1 month"
ExpiresByType application/x-font-woff "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 month"
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
# Styles Css
ExpiresByType text/css "access plus 1 months"
# Arquivos Js 
ExpiresByType text/javascript "access plus 1 months"
ExpiresByType application/javascript "access plus 1 months"
# Desativar cache para o arquivo index.php
# O cabeçalho "pragma" é para compatibilidade com o IE
<FilesMatch "index.php$">
ExpiresActive Off
Header set Cache-Control "max-age=0, private, no-store, no-cache, must-revalidate"
Header set Pragma "no-cache"
</FilesMatch>
#Keep Alive caso não estar ativo
#Header set Connection keep-alive

On Github License

Files

Download PDF of Htaccess file
ENV, no-cache, Pragma, REQUEST_FILENAME, REQUEST_URI

Comments

Apache