【发布时间】:2012-07-13 12:35:44
【问题描述】:
我有 301 重定向,将 /index.html 定向到 /site 文件夹,当我创建子域时,它还将链接重定向到 /site,导致 404 Not Found
例如:members.mysite.com 重定向到 members.mysite/site 导致 404 错误我可以在不更改重定向的情况下为特定的 forlder 或其他内容添加 execption。
.htaccess 内容
AddType text/x-server-parsed-html .htm .html
RedirectMatch 301 ^/index.html(.*)$ /site$1
【问题讨论】:
-
将子域的文档根设置在主域的文档根以外的其他位置或使用 rewrite-mod 来做到这一点!