【发布时间】:2014-08-14 16:19:31
【问题描述】:
我当前的代码是这样的
Redirect 301 /index.html http://example.com/
Redirect 301 /about.html http://example.com/
Redirect 301 /contact.html http://example.com/contact.php
但是,这会影响指向该站点子文件夹的另一个域。
有没有办法说 if(DOMAIN != 'example2.com'){...}
我也使用类似这样的其他 RewriteRule 函数
RewriteRule ^events/?$ events_page.php [L]
这也是为了删除 www
RewriteCond %{HTTP_HOST} ^www\.example\.com$
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]
【问题讨论】:
标签: apache