RewriteRule网站除了文件

时间:2014-05-08 18:25:36

标签: http mod-rewrite

目前我在httpd.conf中有一个RewriteRule,它将example-domain.org引向example-domain2.org:

RewriteEngine On
RewriteRule ^/ http://www.example-domain2.org [R,L]

但我不想在www.example-domain.org/downloads / *

下重定向文件请求

有可能吗? THX。

1 个答案:

答案 0 :(得分:0)

RewriteEngine On
RewriteRule downloads/ - [L]  # do not rewrite downloads/
RewriteRule ^ http://www.example-domain2.org [R,L]  #redirect anything else