开发者

.htaccess redirect to external URL while hiding redirect [duplicate]

This question already has answers here开发者_开发知识库: Closed 11 years ago.

Possible Duplicate:

.htaccess redirect to external URL while hiding redirect

Is there a way to rewrite to an external site while hiding the new address?

RewriteRule (.*) http://www.second-website.com/index.php\?string=$1 [NC,L]

The rule works perfectly for a page on the same server, but on a different server it changes the address as if I had used [L,R=301].

EDIT: I am using a reverse proxy, but getting a 500 error.

ProxyRequests Off

<Proxy *>
Order deny,allow
Allow from all
</Proxy>

ProxyPass /foo http://www.second-website.com/foo
ProxyPassReverse /foo http://www.second-website.com/foo


Looks like you need a reverse proxy. It can be implemented in Apache using mod_proxy. You can use the P flag if you already have a RewriteRule.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜