Mod rewrite 重写cond不';不适用于特定的URL
我们有两个URL(www.floydbariatrics.com和www.floydbariatrics.org) 我正在尝试将所有URL重写到www.floydbariatrics.com 我的.htaccess中有以下内容:Mod rewrite 重写cond不';不适用于特定的URL,mod-rewrite,Mod Rewrite,我们有两个URL(www.floydbariatrics.com和www.floydbariatrics.org) 我正在尝试将所有URL重写到www.floydbariatrics.com 我的.htaccess中有以下内容: RewriteCond %{HTTP_HOST} . RewriteCond %{HTTP_HOST} !^www\.floydbariatrics\.com$ [NC] RewriteRule (.*) http://www.floydbariatrics.com/$
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\.floydbariatrics\.com$ [NC]
RewriteRule (.*) http://www.floydbariatrics.com/$1 [R=301,L]
当我访问www.floydbariatrics.com或floydbariatrics.com或floydbariatrics.org时,重写工作正常
当我尝试访问www.floydbariatrics.org时,我得到:
Page Not Found
We cannot locate the page you're looking for. Please check the address and make sure all letters are lowercased with no spaces.
我完全被难住了
非常感谢您的帮助。您是否为
www.floydbariatrics.org
设置了VirtualHost,或者您是否有服务器别名
。在(共享)托管服务器上,需要为每个域单独配置web服务器软件,因为具有不同内容的多个域通常共享同一IP地址
根据您的web主机提供的控制面板软件(例如cPanel或Plesk),可能会有一个选项用于“驻留域”、“重定向”或“域别名”,以使其正常工作