What are the mod_Rewrite rules for checking multiple folder locations for a given file. For instance, if I have a folder structure of:
public/
css/
Try this:
# Loads files from production server
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (library1|library2)/(.*)$ http://production.com/$1/$2 [R=302,L,NC]
To achieve this:
something.dev/library1/style.css -> production.com/library1/style.css something.dev/library2/vendor/css/style.css -> production.com/library2/vendor/css/style.css
RewriteMap Directive might help.
Try these rules:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{DOCUMENT_ROOT}/library1%{REQUEST_URI} -f
RewriteRule ^css/.+ library1%{REQUEST_URI} [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{DOCUMENT_ROOT}/library2%{REQUEST_URI} -f
RewriteRule ^css/.+ library2%{REQUEST_URI} [L]
Possibly the server variables do not contain what you think. Try increase the logging to debug, so you can see exactly what is going on.