I have a problem with mod_rewrite.
I want to redirect those URIs in the title. I use the following rule
RewriteEngine on
RewriteCond $1 !^(folders not to be redirected e.g. css|images)
RewriteCond $1 !^(.*).(file extension e.g. png|css|txt|php)
RewriteRule ^(.*)$ index.php?id=$1 [L]
It work only if I put all the resources in a folder, else it would tell me:
"/foo/index.php" not found.
So to solve that I put all the resources in the folder "www"
But when I try to load the resources from a subfolder of e.g. "foo" it tells me:
The requested URL "/foo/foo2" was not found on this server.
How can I load resources from a subfolder like "/foo/foo2" or even "/foo/foo2/foo3"?
And how can I solve the problem with the automatic search for index.php in a folder?