如何将example.com/example重定向到外部URL?

时间:2012-02-07 19:58:24

标签: .htaccess redirect

我猜它需要是htaccess。我试过了:

Redirect 301 / http://www.newurl.com/

但是这让我想起了newurl.com/example。

1 个答案:

答案 0 :(得分:2)

如果您只是想直接访问其他网址,则可以使用RewriteRule

RewriteEngine On
RewriteRule ^example http://www.newurl.com [L,R=301]