Question

I have to folders:

-static/ (containing for example index.html, style.css, a.gif and b.gif)

and

-overwrite/ (containing just the a.gif)

I want to configure my vHost to serve the resources from overwrite/ as far as present there and the other resources from static/

Was it helpful?

Solution

Ok found just out how to do it with mod_rewrite:

RewriteEngine on
RewriteCond         %{DOCUMENT_ROOT}/overwrite/%{REQUEST_URI}  -f
RewriteRule  ^(.+)  %{DOCUMENT_ROOT}/overwrite/$1  [L]


RewriteCond         %{DOCUMENT_ROOT}/%{REQUEST_URI}  -f
RewriteRule  ^(.+)  %{DOCUMENT_ROOT}/$1  [L]
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top