I already have two rewrite rules that work correctly for now but some more code has to be added to work perfectly.
I have a website hosted at mydomain.com and all su
The problem is that you need to provide the absolute file system path to get -f
and -d
working. If you’re in the document root, you can use this rule:
RewriteCond $1 !^subs/
RewriteCond %{DOCUMENT_ROOT}/subs/default/$1 -f [OR]
RewriteCond %{DOCUMENT_ROOT}/subs/default/$1 -d
RewriteRule ^(.*)$ subs/default/$1 [L]
But if you’re somewhere else, it’s going to be hard to get the right path prefix.