0

It's been 8 years since the first issue about this was addressed here, it's mind-blowing that this problem still persists today. I have followed all the techniques suggested in all the duplicate posts

https://stackoverflow.com/questions/13850907/remove-index-phproute-from-opencart?rq=1
https://stackoverflow.com/questions/10813809/remove-index-phproute-common-home-from-opencart?rq=1
https://stackoverflow.com/questions/47308011/seo-url-doenst-work-with-homepage-in-opencart-3
https://stackoverflow.com/questions/60787364/how-to-enable-opencart-seo-url
https://stackoverflow.com/questions/1743049/clean-urls-using-opencarts-router-class?rq=1

on this subject but none of them work. I believe it's because they are made for older versions of OC. So I was hoping I can get fresh solutions to this century old problem.

I have enabled SEO and renamed .htaccess file so default OC pages ie. about-us, blog and some products are working. But I still see several urls with these structure/s;

?route=information/information&information_id=8
?route=product/catalog
?route=product/category&path=59_105
?route=information/contact
?route=account/wishlist
?route=common/home

How can I convert these to SEO friendly URLs?

Rob
  • 14,746
  • 28
  • 47
  • 65
Jay Smoke
  • 573
  • 3
  • 13
  • 35
  • Thank you for showing your efforts in your question. Could you please do mention from which url to which url you want to rewrite/redirect? Some examples with what pattern it could be(samples only) in your question to make things more clear will help us understand question more clearly. – RavinderSingh13 Nov 17 '20 at 04:56

1 Answers1

1

You may try this rule to remove route parameter from query string.

RewriteCond %{THE_REQUEST} \?(.*&)?route=[^&]*&?(\S*)\sHTTP [NC]
RewriteRule ^ %{REQUEST_URI}?%1%2 [R=301,NE,L]

This will remove route query parameter but will leave remaining query string intact.

  1. Make sure this your topmost rule in root .htaccess
  2. Make sure you clear your browser cache before testing change
anubhava
  • 761,203
  • 64
  • 569
  • 643
  • Hi @Anubhava thanx for the answer. So basically if you are familiar with opencart, it doesn't use the title for the SEO! So I just want to replace all that in the address with the title? Currently I have to manually add a keyword when adding an item and that is used as the seo url. I was wondering how to simple just use the title of the article automatically? – Jay Smoke Nov 18 '20 at 14:33
  • Sorry I am not familiar with opencart. My answer just removes `route=` query parameter – anubhava Nov 18 '20 at 14:35