문제

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