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/

有帮助吗?

解决方案

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]
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top