Magento主页继续重定向到404页面

时间:2011-05-25 18:14:08

标签: magento http-status-code-404

我已经在这个问题上待了将近一个星期,并且已经在网上进行了研究以获得答案,但我找不到答案。

问题:

每次访问我网站的主页时,都会导致404错误。

离。 http://www.domain.com --->重定向到404

http://www.domain.com/home --->进入我设置为主页的cms页面

我已经运行了magento清理脚本,但它无法解决问题。

ERROR MESSAGE:

Whoops, our bad...

The page you requested was not found, and we have a fine guess why.

        If you typed the URL directly, please make sure the spelling is correct.
        If you clicked on a link to get here, the link is outdated.

What can you do?
    Have no fear, help is near! There are many ways you can get back on track with Magento Store.

        Go back to the previous page.
        Use the search bar at the top of the page to search for your products.
        Follow these links to get you back on track!
        Store Home | My Account

5 个答案:

答案 0 :(得分:10)

我有类似的错误,想在这里发布我的解决方案。对我来说情况完全相同:所有页面,类别等都运行良好,但主页显示404错误。

我查看了core_url_rewrite表,发现有一个“request_path”字段为空的条目。所以这个条目重写了我的基本网址,这就是我的情况下404的原因。我刚刚删除了它。

希望这有助于其他人。

答案 1 :(得分:4)

如果您使用的是企业版,则应检查表enterprise_url_rewrite。以下查询可以帮助您:

select * from enterprise_url_rewrite where request_path="";
delete from enterprise_url_rewrite where request_path="";

答案 2 :(得分:3)

检查以下内容:

1- System-> Configuration-> general-> Web-> secure 基本网址:http://www.your-site.com/ (确保您位于系统左上角的正确商店网站)

2- System-> Configuration-> general-> Web-> Default Pages 默认Web URL:cms(是的只是cms) CMS主页:选择您的cms页面 默认无路由URL:cms / index / noRoute

3-检查您的服务器是否已重写 System-> Configuration-> general-> Web-> Search Engines Optimization 使用Web服务器重写:否

您的.htaccess错误地将文件替换为原始安装程序中的文件。

答案 3 :(得分:1)

因为StackOveflow有这个愚蠢的规则,我必须有一定数量的"点"在我讨论讨论之前,我需要将其作为一个新答案":

open-ecommerce.org的#2也解决了我的问题

  

2-系统 - >配置 - > general-> Web->默认页面默认网址:   cms(是的只是cms)CMS主页:选择你的cms页面默认   无路由URL:cms / index / noRoute

对我而言,这被设置为" index"。不知道它之前是如何工作的,或者为什么这样设置,但是在更新之后它就破了,这对我来说是个修复。

请注意,我也截断了' core_url_rewrite'表以及故障排除。如果你根本不改变网址,或者经常改变网址,那么这没什么大不了的。但是,如果您经常查找网址,那么您将丢失301重定向历史记录(所有旧网址都将继续404)。

答案 4 :(得分:0)

Open-ecommerce.org解决方案#2,为我工作。

我最初将“Defaul Web URL”设置为主页的URL。类似于我对baseURL所做的,但我错了。

我将其更改为“CMS”

从那里开始,一切正常。

谢谢!

相关问题