Categories

Featured templates

OpenCart 2.x. How to deal with 404 errors when SEO URLs are enabled

Judy Waters February 1, 2016
Rating: 5.0/5. From 3 votes.
Please wait...

This tutorial shows how to deal with 404 errors when SEO URLs are enabled in OpenCart 2.x.

OpenCart 2.x. How to deal with 404 errors when SEO URLs are enabled

Sometimes Opencart store returns with ‘Error 404 – Not Found’ for the inner pages. This happens due to the incorrect settings for SEO. Let’s see how to deal with that:

  1. Make sure to have SEO URLs enabled first of all. Navigate to System> Settings > your store > Server > Use SEO URLs. Set them to ‘YES’ and save changes:

    OpenCart_2_-How_to_deal_with_404_errors_when_SEO_urls_are_enabled_1

  2. Access your server files and locate ‘.htaccess.txt’ file in the root of the Opencart installation. Rename the file to be ‘.htaccess. Delete .txt extension:

    OpenCart_2_-How_to_deal_with_404_errors_when_SEO_urls_are_enabled_2

  3. Next, go to the site admin panel once again. Navigate to Catalog> Products> select the product> Edit> Data> SEO URL tab there. It contains the actual user-friendly link. By default, it has spaces. They can’t be actually used. Therefore update content of the tab to have no spaces. Replace them with hyphens or underscore only. Make sure that this tab contains unique combination of words, as duplicates are forbidden:

    OpenCart_2_-How_to_deal_with_404_errors_when_SEO_urls_are_enabled_3

    Note: the same change of SEO URL tab should be performed for each product of the store.

  4. In case your website is installed to the subfolder (as in our case), one more change is required:

    1. Get back to the server files once again and locate there the same .htaccess file. Open it to edit.

    2. Find the following line there (around line #20):

      RewriteBase /BRB/theme###/

      where theme### is unique name of your theme:

      OpenCart_2_-How_to_deal_with_404_errors_when_SEO_urls_are_enabled_4

    3. Replace the URL reference with the name of subfolder for your store, for example:

      RewriteBase /opencart/

      OpenCart_2_-How_to_deal_with_404_errors_when_SEO_urls_are_enabled_5

      Note: make sure to have closing slash after the subfolder name.

    4. Save changes and reload the file.

Get back to your store and check the same product page once again. It should be opened successfully. Enabled SEO URLs don’t cause Error 404 any longer.

Feel free to check the detailed video tutorial below:

OpenCart 2.x. How to deal with 404 errors when SEO URLs are enabled

OpenCart Responsive Themes
This entry was posted in OpenCart Tutorials and tagged 404 error, opencart, seo, url. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket