Magento Homepage Keeps on redirecting to a 404 page

I have been on this issue for almost a week now and have been research all over the net for answers but i could not find one.

Problem:

each time i access the homepage of my site, it results to a 404 error.

ex. http://www.domain.com ---> redirects to 404

http://www.domain.com/home ---> enters to the cms page that i set as my homepage

I have already run the magento cleanup scripts but it was not able to solve the problem.

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

Upvotes: 6

Views: 13470

Answers (5)

Caleb
Caleb

Reputation: 57

Because StackOveflow has this stupid rule that I must have a certain number of "points" before I can chime in on discussions I need to make this as a "new answer":

open-ecommerce.org's #2 also solved the problem for me

2- System->Configuration->general->Web->Default Pages Default Web URL: cms (yes just cms) CMS Home Page: select your cms page Default No-route URL: cms/index/noRoute

for me this was set to "index". No clue how it worked before, or why it was set that way, but after updating it broke and this was the fix for me.

Note that I did also truncate the 'core_url_rewrite' table as well in troubleshooting. If you don't change urls at all, or often, then that's no big deal. But if you are chaning URLs often, then you'll loose your 301 redirect history (all old urls will 404 going forward).

Upvotes: 1

PHP Bugs
PHP Bugs

Reputation: 1183

If you are using the Enterprise version you should check the table enterprise_url_rewrite. The query below should help you:

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

Upvotes: 4

OrlandoWebDesign
OrlandoWebDesign

Reputation: 1

Open-ecommerce.org solution # 2 , worked for me.

I initially set my "Defaul Web URL" as the URL of the homepage. Similar to what I did with the baseURL but I was wrong.

I changed it to "CMS"

From there, it all works.

Thanks!

Upvotes: 0

open-ecommerce.org
open-ecommerce.org

Reputation: 1814

Check the folowing:

1- System->Configuration->general->Web->secure Base URL: http://www.your-site.com/ (be sure you are in the right shop site from the top left of the system)

2- System->Configuration->general->Web->Default Pages Default Web URL: cms (yes just cms) CMS Home Page: select your cms page Default No-route URL: cms/index/noRoute

3- check your server has rewrites otherwise System->Configuration->general->Web->Search Engines Optimization Use Web Server Rewrites: No

4- something wrong with your .htaccess replace the file with the one in your original installer.

Upvotes: 3

PauGNU
PauGNU

Reputation: 793

I've got a similar error and would like to post my solution here. The case was exactly the same for me: all the pages, categories, etc. worked perfectly, but the home page showed a 404 error.

I looked into the core_url_rewrite table and discover that there was an entry with the «request_path» field empty. So this entry was rewriting my base url and that was the reason for the 404 in my case. I just deleted it.

Hope this helps to other people.

Upvotes: 13

Related Questions