Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I currently have User SEO URL's set to Yes in OpenCart Admin.

System -> Settings -> Store -> Server -> User SEO URL's

So far, all tags and SEO links are working; the command has done the desired effect.

However for the homepage and a few other links; how do I remove:

index.php?route=common/home

From the URL? Do I have to literally do a find and replace in the hardcode PHP files and risk upgrades or is there another way?

(without bloating performance i.e no poor amateur tools such as vQmod)

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
5.3k views
Welcome To Ask or Share your Answers For Others

1 Answer

To simply remove that, you can do a basic replace in /catalog/controller/common/seo_url.php

Find:

return $link;

Before it on a new line put:

$link = str_replace('index.php?route=common/home', '', $link);

Edit by TheBlackBenzKid: If you want full SEO just use this line instead of the above:

$link = str_replace('index.php?route=', '', $link);

Also make sure SEO URLs is turned on in the Admin panel of the store.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...