I'm no mod_rewrite pro, but something like that should work
- Code: Select all
RewriteRule !\.(js|ico|gif|jpg|png|css)$ index.php [NC,L]
(stolen from an old Zend Framework Manual)
All requests exept .js, .ico, .gif, .jpg, .png and .css files will be rewritten to index.php
You can simply add or remove file extensions to the list.
You have to exclude static files otherwise your css or images in html code will not work anymore.
Maybe Nobbie the rewrite expert (to not say rewrite guru) does have a better idea.