After migrating magento I've encountered weird errors.

  1. On the bottom of my product page there is a 404 error. Nevertheless, all content is showing above and everything other works fine.
  2. There is another error when I access some page in main menu, from product page, then there is prefix added to the url nameofthecategory/nameofthepage.html and I get also 404.

I've managed to solve this second error by turning off urls for categories path, so the link format now is nameoftheshop.com/nameoftheproduct.html

However error number one stays. I tried:

  • Clearing cache
  • Reindex
  • Deleting and reaploading .htaccess to the root folder of magento installation
  • Checked catalog.xml for product view layout, also checked view.phtml
  • Checked base url in the database on that two places
  • Checked product sufixes
  • Adding index.php in front of product url does not change anything

Any ideas? Im struggling with this for 3 days now..

  • Not sure if this is the answer, but I had a a similar issue and it was cause by a wrong opening of a php tag. I had some commented code in the template like this <?php/*code here / ?> There was no space between <?php and the comment /*. Check you product view templates for something similar.
    – Marius
    Jun 3, 2013 at 6:49
  • also you can turn on the template path hints to see what template is rendering the 404 section.
    – Marius
    Jun 3, 2013 at 7:44
  • Well this is almoust impossible. Besides that stuff I tried before, I - created new product with just some options, commented out template by template and tested in layout files, checked my html markup, checked my php as you suggested, reuploaded all magento .htaccess files through directories with fresh instalation magento htaccess files, reuploaded my original catalog xml and product view.phtml... And still 404! mage.devpassion.eu/izdvojeni-proizvodi/…
    – xul
    Jun 3, 2013 at 12:49

1 Answer 1


First make sure your Base url has a trailing / (http://example.com/). Thats found in System>Configuration>Web>Unsecure and Secure. It can also be changed in core_config_data table in the database directly.

Secondly check the web server rewrite rule. System>Configuration>Web>Search Engines Optimization set Use Web Server Rewrites to Yes

Thirdly I would check the options related to the .html suffix. Go to Secondly check the web server rewrite rule. System>Configuration>Catalog>Search Engines Optimization (not in Web, but in Catalog). And check the settings there related to the product url suffix and category url suffix.

Lastly, I would try renaming the .htaccess file and uploading an original one. There might be some manual rewrite rules written in there.

  • 1
    Ive managed to solve the 404 after visiting menu from product view. However that weird 404 on the bottom of the products stays. So all of my content on product view phtml template is loaded normally but there is 404 message at the very bottom.
    – xul
    May 30, 2013 at 23:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.