【发布时间】:2014-10-11 04:37:34
【问题描述】:
在我的 .htaccess 上:
我尝试使用下面的行代码将 404 页面 about_us 页面重定向到 about-us 页面
redirect 301 /about_us http://www.example.com/about-us
但是当我试图加载到浏览器时,about-us 页面被重定向到该页面到
http://www.example.com/about-us?_route_=about_us但页面仍然出现404错误
这是我的 .htaccess 规则
RewriteBase /
#RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
#RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^download/(.*) /index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
【问题讨论】:
-
您的 .htaccess 中有更多规则吗?如果是,请在此处发布相关问题。
-
可能是因为 https 版本的网站?
标签: .htaccess http-status-code-404 opencart