first_page the funky knowledge base
personal notes from way, _way_ back and maybe today

Zend Framework: Rewriting with .htaccess

Routing requests

Again, these rules direct all requests to index.php, except specified file types:

RewriteEngine on RewriteBase / RewriteRule !\\.(js|ico|txt|gif|jpg|png|css)$ index.php

Handling file and directory exceptions

These rules (used immediately prior to the RewriteRule above) exclude real files and directories from the rewriting and lets them pass through unaffected:

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

You can also simply allow a specified group of files to pass through unaffected by using this line:

RewriteRule ^(foo|bar).* - [L]

In this case, files foo.* and bar.* will be accessed normally.

[http://framework.zend.com/wiki/ display/ZFDEV/Configuring+Your+URL+Rewriter]

Also, see “Blueprint for PHP Applications: Bootstrapping” here:

[http://devzone.zend.com/node/view/id/70]

mod date: 2008-08-25T02:40:23.000Z