Page 1 of 1
SEF not working, even if all config correct ?
Posted: Tue Jan 23, 2018 5:02 pm
by soamjena
Both of my opencart sites SEF URLs are not working.
I have enabled it on the settings.
.htaccess is set and permission are done too.
What else can it be ?
I cannot think about any reason.
mod_rewrite is perfectly fine too.
Re: SEF not working, even if all config correct ?
Posted: Wed Jan 24, 2018 4:46 am
by straightlight
soamjena wrote: ↑Tue Jan 23, 2018 5:02 pm
Both of my opencart sites SEF URLs are not working.
I have enabled it on the settings.
.htaccess is set and permission are done too.
What else can it be ?
I cannot think about any reason.
mod_rewrite is perfectly fine too.
No OC version posted, more information regarding the bolded statement would be needed in order to provide an accurate solution to this problem.
Re: SEF not working, even if all config correct ?
Posted: Wed Jan 24, 2018 1:04 pm
by soamjena
OpenCart © 2009-2018 All Rights Reserved.
Version 3.0.2.0
Re: SEF not working, even if all config correct ?
Posted: Wed Jan 24, 2018 1:06 pm
by soamjena
My website is this
https://goo.gl/qEjRfx
here is the htaccess file.
http://prntscr.com/i4r3oa
Re: SEF not working, even if all config correct ?
Posted: Fri Jan 26, 2018 4:25 am
by Goodie
Maybe an easy solution but did you made any seo keywords in Design-SEO URL?
Re: SEF not working, even if all config correct ?
Posted: Fri Jan 26, 2018 2:54 pm
by soamjena
Goodie wrote: ↑Fri Jan 26, 2018 4:25 am
Maybe an easy solution but did you made any seo keywords in Design-SEO URL?
Yes I have placed for few products and pages to see if its working , but it doesnt.
Re: SEF not working, even if all config correct ?
Posted: Fri Jan 26, 2018 4:39 pm
by uksitebuilder
please install and enable Google Sitemap in your Extension - Feeds section
Then test yourdomain.com/sitemap.xml to see if it displays
If not, check with your host that mod_rewrite is enabled
Finally, I see you have some form of Wordpress installed in your site. Do you have another .htaccess file somewhere which may be overriding the default OC .htaccess?
Re: SEF not working, even if all config correct ?
Posted: Fri Jan 26, 2018 4:42 pm
by soamjena
uksitebuilder wrote: ↑Fri Jan 26, 2018 4:39 pm
please install and enable Google Sitemap in your Extension - Feeds section
Then test yourdomain.com/sitemap.xml to see if it displays
If not, check with your host that mod_rewrite is enabled
Finally, I see you have some form of Wordpress installed in your site. Do you have another .htaccess file somewhere which may be overriding the default OC .htaccess?
Yes sitemap is working just fine,
http://www. superbikestore .in / sitemap.xml
And there is no other htaccess in the location.
mod-rewrite is enabled too, as it works fine in all other domains in the same server.
Re: SEF not working, even if all config correct ?
Posted: Fri Jan 26, 2018 9:09 pm
by uksitebuilder
Instead of using the Design - SEO section, please try editing a product - click on the SEO tab and enter a keyword there.
Please make sure the keyword is alpha-numeric only all in lowercase.
I have tested this on a default installation of 3.0.2.0 and it works without problem.
If still not working after trying the above, please make sure you have no extensions installed that may affect SEO URLs and/or re-install the default OC Files from the Download section on OpenCart.com (not from the master branch at GitHub)
Re: SEF not working, even if all config correct ?
Posted: Fri Jan 26, 2018 9:20 pm
by soamjena
Working now.
Very weird.
I will test the 2nd site, where its not working too/
Re: SEF not working, even if all config correct ?
Posted: Thu May 10, 2018 2:40 am
by loroverde
I am glad this issue was successfully fixed.
However, I would like to share my own experience because it may be helpful for someone else struggling with the same situation I have suffered. My site is still being built (OC 3.0.2.0). I tried to activate the SEO URL without any success. Everything run smooth, no errors displayed, but the URLs were the long and ugly ones, not friendly at all. I checked many times everything: htaccess, admin back-end setup, proper SEO words... Nothing, it didn't work and I was really frustrated during several days, unfairly blaming Opencart and my host provider. I did extensive and useless Googgle search during those sad days without getting any good clue. Fruit of my desperation, I finished looking the OC database (mySQL) inside my host provider. And suddenly I discovered something weird. There was a table called "oc_url_alias" containing all the sample products of Opencart: Apple, Macs, etc. None of my own products was in there... Something was going bad. Googling a little bit, I discover that OC 3.0 is no longer using that table. It has been replaced by other table called "oc_seo_url". Bingo! all my new products were in that table! Something related to these two tables was working wrong...
Another bit of investigation allowed me to discover that the piece of software controlling that SEO URLs is inside catalog/controller/startup... It is called "seo_url.php". My existing "seo_url.php" was using the former table "oc_url_alias" instead of the new "oc_seo_url". I renamed the script to "seo_url_old.php" and uploaded the original "seo_url_php" existing in the installation files. I refreshed my website and all SEO URLs started to work like a charm!
Lesson learned: If you have done all the SEO URL setup as written in many posts and sources, you are not getting any error, but the frindly URLs are still not appearing try this:
- Go to your admin back-end panel (host provider) and check if you have a table called "oc_url_alias".
- If this is the case, replace the "seo_url.php" script in the OC folder mentioned above with the original one from the installation files.
- Refresh your webpage and check if it did the magic!
I guess that the reason of this problem was the instalation of some free extensions not very well coded. One of them probably replaced the new table for the former one. So be careful when installing extensions. Do it one by one and carefully check if there are unintended effects.
Re: SEF not working, even if all config correct ?
Posted: Thu May 10, 2018 7:15 pm
by soamjena
I find that, even if URL are there in backend, many products in frontend doesnt show the clean URL.
Re: SEF not working, even if all config correct ?
Posted: Wed Jan 09, 2019 8:37 am
by kct.dendulk
loroverde wrote: ↑Thu May 10, 2018 2:40 am
I guess that the reason of this problem was the instalation of some free extensions not very well coded. One of them probably replaced the new table for the former one. So be careful when installing extensions. Do it one by one and carefully check if there are unintended effects.
Thank you so much for sharing. After hours and hours of searching for my seo error 500 problem found your post and tried.. it worked..
It seems the extention "Form Creator - Multiple - Drag and Drop OpenCart" from Leopedia caused this problem, a few core files will be overwritten, like /catalog/controller/startup/seo_url.php