lets say I have an incoming request site.com/en/resources/help.jpg
I would like to test if the file exists by ignoring the the /en part. /en folder is not present in documentroot.
Below works only if there is an en folder. Is there way to remove /en part and then test if a file exists?
- Code: Select all
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d
RewriteRule ^/(.*)$ http://localhost:3000/$1 [P,L]
I did try to experiment with expressions and If module but cant get it working.