Remove index.php?route=common/home from OpenCart

2020-01-26 06:25发布

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)

13条回答
forever°为你锁心
2楼-- · 2020-01-26 07:20

In file \system\library\response.php add next line at the beginning of the public function output()

if (!defined('HTTP_CATALOG')) $this->output = str_replace(array('index.php?route=common/home', '?route=common/home'), '', $this->output);
查看更多
登录 后发表回答