Progmar Marcin Załęczny


Htaccess examples

Deny access to files and directories (works recursive in depth):

<Files ~ ".*">
    Order allow,deny
    Deny from all

Allow access to files and directories together with mod_rewrite to index.php file:

<Files ~ ".*">
    Order allow,deny
    Allow from all

SetEnv APPLICATION_ENV development
DirectoryIndex index.php
RewriteBase /demos/zend-framework/new-project/public/

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]