tquensen/QF2/master/web/.htaccess - Htaccess File

tquensen/QF2/master/web/.htaccess

#protect cli.php
Order Deny,Allow
Allow from All
<Files "cli.php">
Deny from All
</Files>

#one possible way to determine the current environment (local dev system, production server, ..)
#use getenv('qf_env') in your index/bootstrap script to read this value
#SetEnv qf_env "prod"

RewriteEngine on

#i18n
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([a-z]{2})/(.*)$ index.php?language=$1&route=$2 [L,QSA]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?route=$1 [L,QSA]

AddDefaultCharset utf-8

<IfModule mod_deflate.c>
SetOutputFilter DEFLATE
</IfModule>

<IfModule mod_expires.c>
<Files ~ ".(png|gif|jpg|jpeg|js|css|ico|eot|ttf|otf|svg)$">
ExpiresActive On
ExpiresDefault "now plus 1 years"
</Files>
</IfModule>

<Files ~ ".php$">
    FileETag None
    Header set Cache-Control "no-cache, must-revalidate, max-age=0"
    Header set Pragma "no-cache"
</Files>

On Github License

Files

Download PDF of Htaccess file
DEFLATE, no-cache, Pragma, REQUEST_FILENAME

Comments

Apache