我将所有非www网址重定向到www。对,我用下面的htaccess的规则:非www到www重定向里面的文件夹重定向404
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www.example.com [NC]
RewriteRule (.*)$ http://www.example.com/$1 [R=301,L]
大多数URL的其工作,除了这一个:
example.com/admin/stats.php
stats.php放在管理文件夹内。 [/ public_html/admin /]。当我尝试上述网址,它返回找不到404和重定向的URL是www.example.com/401.shtml
在同一htaccess中
RewriteRule ^([^/]+)/([^\.]+)\.html$ predicts.php?cn=$1&dte=$2 [L]
RewriteRule ^([a-z]{2})/?$ index.php?cn=$1
RewriteRule ^prediction/([0-9]*)/(.*)/?$ common.php?pid=$1 [L]
RewriteRule ^profile/(.*)/?$ profile.php?id=$1 [L]
那么,什么是这里的问题等重定向?任何帮助非常感谢,谢谢!
你有什么其他rewriterules? – ThinkingMonkey 2012-02-15 05:41:55
@ThinkingMonkey我在编辑中更新了这些规则。请检查一下 – VKGS 2012-02-15 06:16:00
这个'.htaccess'驻留在哪里?你在管理文件夹的'htaccess'中是否有其他重写? – ThinkingMonkey 2012-02-15 06:19:24