I want to rewrite the URL when receiving a request that is not a file and either for directory subdir
or not a directory at all.
E.g. (!file
) && ( (subdir
) | ( !directory
) )
Here's my .htaccess
:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} ^/(subdir|subdir/.*).*$ [OR]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+) index.php?request=$1 [QSA]
It works everywhere except for subdir
. The rewrite condition to catch subdir
is not working, it behaves as if there is no rewrite rule at all. What am I doing wrong here?