I am having an issue getting a specific rewrite requirement working on lighttpd/mod_rewrite.
We have a folder that is called "/app/" with another folder inside that "/app/admin/"
"/app/index.php" is used for a bunch of SEO friendly urls. But the "/app/admin/" folder does not have any SEO friendly urls.
I am trying to get any request to "/app/*" to use index.php UNLESS it is going to the "/app/admin/" folder or if it is going to a PHP file.
I have been unable to get this working without a bunch of infinite loops taking place.
Here is the lighttpd mod_rewrite conifig:
url.rewrite-if-not-file = (
"/admin$" => "/admin/index.php",
"/admin/.+(?!\.php)$" => "/admin/index.php",
"/.+(?!\.php)$" => "/index.php",
)
Here is the rewrite config from our apache install which was working:
RewriteBase /app/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /app/index.php [L]