-1

我读过很多人有这个问题,并尝试了很多策略。但是,我仍然无法将peaceandtruth.com 的所有子页面重定向到oldmankit.com,这正是我想要的。我的情况可能有点混乱,因为我正在使用一个带有附加域的共享主机帐户。oldmankit.com 是插件域。

这是我的 .htaccess 文件:

Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^peaceandtruth\.com$ [NC]
RewriteRule ^(.*)$ http://oldmankit.com [R=301,L]

如果你去http://peaceandtruth.com/me/,你会看到它没有重定向。

非常感谢你的帮助。

4

1 回答 1

2
RewriteCond %{HTTP_HOST} !^peaceandtruth\.com$ [NC]

这意味着“如果 HTTP_HOST不是 peaceandtruth.com ”。为正匹配去掉感叹号。

于 2012-06-18T10:52:09.227 回答