Magento Homepage Keeps on redirecting to a 404 page - magento

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

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.

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="";

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.

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).

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!

Related

magento Every Product detail page showing 404

I have shifted from live site to local site, the product detail page is showing a 404 page. I tired re-index multiple time.clear cache. check database also but it still displays a 404 page.
There can be several things you can check:-
1. Check for url in core_config_data and also check cookie url.
2. Check on server for mod_rewrite module may be this is not enabled on local, this can also be the reason if you were using SEO friendly url.
Clear the cache once you are done with these. It will be great if you can tell how url for PDP page is been generated on local.
my url is like this
http://localhost/reyassoc/10x-a4-silver-diamond-brochure-island-stand.html
same it working on existing live site
Run below sql query
SELECT * FROM `core_config_data` WHERE path = "web/seo/use_rewrites";
See whether the value 1 or not, if the value is 1, try to change it to 0.
This value is for SEO friendly url, which removes index.php from your store url.
Also, you can replace your .htaccess file with default one in Magento root folder.
Your server may have problem with mod_rewrite module or its configuration, you may re-install it.

Magento Admin URL 404

I know that that similar issues and topics exist, however my issue differs slightly and none of the proposed fixes have worked.
I was accessing the Magento backend as normal. Approximately 10 minutes after that I could no longer access the Magento backend.
What I mean is that when I go to the admin url login page, I get a 404. However the 404 isn't generated by my host, it's generated by my webstore.
Everything about my webstore works as normal.
I've seen a number of fixes, mainly this one...
http://www.magentocommerce.com/boards/viewthread/207981/#t274443
I have a few main issues.
Admin Custom URL had been set (but not by me). It was set over a year ago when Magento was installed. It worked entirely fine until today.
I do not even have "admin/url/custom" and "admin/url/use_custom" in my "core_config_data" PHP table. It simply does not exist so I cannot change it. I looked manually for it and did a search for it. Nothing.
I tried updating the local.xml file and clearing "var/caches" and "var/sessions" but that did not work either.
I've been working this for hours and it's beyond frustrating. It's imperative that this be fixed ASAP because we are a fairly sizeable company.
Thanks ahead for helping. Anything at all would be appreciated.
First Check your Apache configurations
I know that you said you were only in the Magento admin but I would first check that apache was configured correctly. This is the first point of contact and you need to ensure that it's working right.
You need to locate a default Magento htaccess file that you can upload to your server. There's additional configurations that you need to make if you're in a subdirectory and also check to make sure that your mod_rewrite is working properly. There's an extensive tutorial on these things here, magento htaccess.
Make sure that you have the right magento admin url
I have to assume that you know what your magento admin url is, but of course I would double check that you're getting it right. There is an option in the admin area to change the admin url, you could have adjusted that on accident.
You say that you don't have "admin/url/custom" and "admin/url/use_custom" in your core_config_data table. This actually means that you didn't set the magento admin url from the admin area. However there is a third place that you can look for your admin url. This is in app/etc/local.xml but you couldn't have changed this from the administration area.
Did you turn off search engine friendly urls?
If you had been accessing your administrative area using /admin and then accidentally turned off SEF urls, then your admin area could have just simply moved to /index.php/admin. Of course you mentioned that you have a custom admin url, but I don't know what that is, so I'm giving examples with the default.
I can't really give you any more suggestions without more information. I hope that this helps!
Found this and thought I would post here since it shows up in google.
http://sourcelibrary.org/2011/05/19/magento-404-page-not-found-error-for-admin-panel-access/#comment-8444

Magento - home page url

i have a two store magento installation, and i have a problem with home page's url: in both stores the home is a cms page, in cms.xml layout the route for that is cms_index_index. this seems to be a problem in one of the stores, which has a complete different layout for logged and non logged users: after loggin in, the url from www.mystore.com becomes www.mystore.com/index.php/cms/index/index/, if i logout the url remains www.mystore.com/index.php/cms/index/index/. i need that the store url remain www.mystore.com. how can i do that? is something that could be done with xml or other magento configuration or is something related to other (e.g. apache, rewrite,...)?
thanks,
Luke
The problem probably lies in the template files.
There are different ways of getting the homepage url (and it's probably using one that's not helpful for you).
Here is the correct call that should be made from the templates:
Mage::getBaseUrl();
This call can be done from anywhere - just make sure to echo it.
Pesach

Set up a cms page for Magento

I've been trying to set up a CMS page in magento to be the home page, and it's just killing me - how hard should this be? no matter what I set up, I get a 404.
Can somebody tell me basic steps to set up a CMS page as the home page for a Magento install, living at:
http://www.mymagentoinstall.com/
I can't have the url key for the CMS page be empty, but setting the default page in the System->Config->Default Pages->CMS Home Page (which seems like it should work), still gives me a 404.
thx for any help
Hours of head banging later .... I’ve changed the parameter “Use Web Server Rewrites” on System -> Configuration -> Web from Yes to No. And it worked! My provider set this by default, so had to change it. Only downside is that I now get the /index.php extension added.
Did you check to make sure that the page was enabled and visible in your store view?
Ok - figured it out. In the System->Config->Web, the Default Web URL needs to be 'cms' (no quotes) - I guess that tells Magento to use the cms page instead of a default url.
In csm - pages create some html in the page, eg start simple with My Homepage.
Give it a name and take care the url is "home" (without the quotes.
Now go to system - configuration - web and select your homepage (name) from the dropdown where in lets you choose the homepage.
That should do it.
Your CMS Page Identifier should be home
I was running into the same issue. No matter what I did, the home page came back as a 404. I had it working on a test server (with a different database) and compared the options side by side. Absolutely nothing worked, the home page, named 'home' and the 'cms' was properly set, mod_rewrite working, htaccess file just peachy...but domain.com/ wouldn't work. after a few hours I saw that domain.com/home/ did, though I swear it hadn't been.
Finally I wiped the blood off the keyboard where I'd been smashing my head against it and went into url rewrite management and set id path to '/', request path to '/' and target path to '/home/' and it works like it should have all along. Hope this helps someone else!

How to solve 404 not found problem in Magento

I have installed full release Magento on localhost from http://www.magentocommerce.com/download. Before doing installation I have created a database and import Magento sample database (downloaded from Magento site).
After that continue installation process. When I checked fronted its shows Best Selling Products when I clicked any of the product it gives error given below:
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 Demo 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
I am new to Magento.
I've experienced this too. In the admin go to System > Index Management and rebuild the various catalog indexes, especially the URL rewrites.
This is because the sample data doesn't have it's paths stored to begin with, it needs to be calculated, and the Best Selling Products section doesn't read the actual paths in use, instead it is a Static CMS Block with it's HREFs fixed. This will probably never occur for products you enter yourself so it's nothing to worry about.
I had the same problem in Wamp. I had my folder named Magento, renaming it to magento, fixed the problem. (Lower case)
I had a similar issue, I was transferring Magento from a Unix server to a Windows server. My issue was to do with links looking like this (not working)
http://www.magentoshop.com.au/shop/product01.html
instead of
http://www.magentoshop.com.au/shop/index.php/product01.html
Haven't worked out how to fix all links yet, but just adding it tells me where the issue lies. Hope it helps someone else.

Resources