views:

43

answers:

2

Ive started out with the most basic rewrite there is, take any request and give it to my index page:

RewriteEngine On
RewriteRule ^.*$ index.php [L,QSA]

Im trying to change it now so lets say i have a directory called special, I actually want to be able to go to http://example.com/special and access whatever files are in there.

I tried this:

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

but it didnt work.

+3  A: 

Try either this:

RewriteRule !^special/ index.php [L]

Or this:

RewriteRule ^special/ - [L]
RewriteRule ^ index.php [L]
Gumbo
the first got it working
asasdas
A: 

If you want this to apply to any directory, try this:

RewriteEngine On
RewriteCond %{REQUESTFILENAME}!-d 
RewriteRule ^ index.php [L]
Jeremy Stein