有可能有一个特定的URLredirect。 我的意思是以下。
redirect到其他网站。 在这个网站上有图片在http://www.examples/images
ProxyPass /content http://www.example/content ProxyPassReverse /content http://www.example/content
但图像不加载,所以我尝试添加。
ProxyPass /images http://www.example/images
但是也有http://www.proxy.com/images下的代理图像,我尝试redirect。
所以当需要的时候,可以只为example.com网站redirect图片?
我希望阿爸明白我的意思:)
在mod_alias中使用Redirect指令,请参阅这里的文档。
这应该可以帮助你:
# Redirect to a URL on a different host Redirect "/content" "http://www.example/content"
如果你想链接一个特定的URL模式到另一个网站,那么这个问题已经在这里使用mod_rewrite而不是ProxyPass来回答: https : //stackoverflow.com/a/1701992/1725739
到目前为止,我尝试了其他解决scheme
RewriteEngine On RewriteCond %{REQUEST_URI} !myproxy.com/content/$ [NC] RewriteRule ^ htpp://www.example.de%{REQUEST_URI} [L,NE,P]
但是,一切都redirect到www.example.com我怎样才能改变这一点?