【发布时间】:2012-04-25 18:40:02
【问题描述】:
基本上,谷歌列出了我的附加域的所有子域页面。
谷歌列表 http:// 万维网。 mymainwebsite.com(这很好)
还有
http://www.子域。 mymainwebsite.com(不好)
所以........在htaccess中我添加了这个:
RewriteCond %{HTTP_HOST} ^subdomain.mymainwebsite.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.subdomain.mymainwebsite.com$
重写规则 ^/?$ "http\://www.mymainwebsite.com/" [R=301,L]
这适用于主子域,但我可以“仍然访问”所有子域页面,例如我仍然可以访问: http:// 万维网。 subdomain.mymainwebsite.com/about
Google 已经列出了“数百个”上述子域“页面”
所以我的问题是......我可以在我的 htaccess 中添加任何“代码”,它会重定向“所有”不幸在谷歌中列出的子域“页面”吗?
我想要http://www.subdomain.mymainwebsite.com/about(常见问题/历史/联系人/链接,还有数百页)
前往
http://www.mymainwebsite.com/about(常见问题/历史/联系人/链接,以及数百页)
谢谢大家!
【问题讨论】:
标签: .htaccess redirect dns rewrite add-on