Reputation: 690
Say I have the following code:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/\.]+)/?$ controller.php?request=$1 [L,QSA]
If I go to a folder such as folder/subfolder/, it gives me a 404 error, although the folder exists.
How can I make this work with subdirectories?
Thanks
Upvotes: 1
Views: 56
Reputation: 143856
Try changing the pattern in your rule from ^([^/\.]+)/?$
to ^([^\.]+)/?$
so that it matches against slashes.
Upvotes: 1