chrispotter/BA/master/.htaccess - Htaccess File

chrispotter/BA/master/.htaccess

<IfModule mod_rewrite.c>

############################################
## enable rewrites

    Options +FollowSymLinks
    RewriteEngine on

############################################
## workaround for HTTP authorization
## in CGI environment

    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

############################################
## TRACE and TRACK HTTP methods disabled to prevent XSS attacks

    RewriteCond %{REQUEST_METHOD} ^TRAC[EK]
    RewriteRule .* - [L,R=405]

############################################
## never rewrite for existing files, directories and links

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l

############################################
## rewrite everything else to index.php

    RewriteRule ^(.*)$ /index.php [L,QSA]

############################################
## prevent access to the config.xml

    RewriteCond %{HTTP_REFERER} !^http://(www.)?localhost [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www.)?localhost.*$ [NC]
    RewriteRule .(xml)$ - [F]

</IfModule>

On Github License

Files

Download PDF of Htaccess file
HTTP_REFERER, REQUEST_FILENAME, REQUEST_METHOD

Comments

Apache