2015-04-02 46 views
1

我使用下面的代码htaccess的,这样当用户键入www.current_website.com/go或www.current_website.com/go/他们去到另一个网站www.other_website.comhtaccess的条件破坏等图片和网页

RewriteRule go http://www.other_website.com 
RewriteRule go/ http://www.other_website.com 

问题是logo.jpg图像堂妹”它包含去没有出现 的logout.php页面(也含有去)在current_website访问时,它进入www.other_website.com

这怎么解决?

回答

0

你需要确保go是所有有被它锚定到开始和结束。我也使斜线可选,以便您只需要1规则:

RewriteRule ^go/?$ http://www.other_website.com 
       ^the end of the path 
       ^^ optional slash 
      ^the start of the path 
0

也许用?

RewriteRule http://www.current_website.com/go http://www.other_website.com 
RewriteRule http://www.current_website.com/go/ http://www.other_website.com