Nette framework: .htaccess file

Playing with nette php framework, here is www/.htaccess file, which is working on 1and1 linux platform:
AddType x-mapp-php5 .php
Options +MultiViews

# disable directory listing
<IfModule mod_autoindex.c>
Options -Indexes

# enable #cool URL
<IfModule mod_rewrite.c>
RewriteEngine On
#following line uncommented on 1and1:
RewriteBase /

# prevents files starting with dot to be viewed by browser
RewriteRule /\.|^\. - [F]

# front controller
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule !\.(pdf|js|ico|gif|jpg|png|css|rar|zip|tar\.gz)$ index.php [L]

# enable gzip compression
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript text/javascript application/javascript application/json

This entry was posted in workday. Bookmark the permalink.

Leave a Reply