如何停止htaccess重定向替换URL

时间:2012-04-30 14:21:33

标签: .htaccess redirect

我的.htaccess文件中有以下内容可以正常工作,除非我点击:

http://bunkerbuster.com/profiles/1

地址栏中的网址将替换为新网址。我不希望这种情况发生,我希望URL仍然显示bunkerbuster.com

感谢您的帮助。

Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule ^profiles/([0-9]+)$ http://projectzebra-bunkerbuster.herokuapp.com/profiles/$1 [R,L]
RewriteRule ^profiles/([0-9]+)/$ http://projectzebra-bunkerbuster.herokuapp.com/profiles/$1 [R,L]

1 个答案:

答案 0 :(得分:0)

你似乎在尝试让Apache充当代理。

这不能使用htaccess完成,但可以使用mod_proxy:

完成

http://httpd.apache.org/docs/2.0/mod/mod_proxy.html#proxypass