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

前端 未结 15 1142
太阳男子
太阳男子 2020-11-29 04:56

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

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

15条回答
  •  旧巷少年郎
    2020-11-29 05:18

    I came late but my solution could be useful for others (tested on Opencart 2.0.3.1):

    Open your MySQL console and run this query (change YOURDATABASE with your db name):

    INSERT INTO `YOURDATABASE`.`url_alias` (`url_alias_id`, `query`, `keyword`) VALUES (NULL, 'common/home', ' ');
    

    How it works:

    The trick consists in adding a WHITE SPACE (' ') for the column "keyword", if you insert an empty string ('') this workaround doesn't work and the url rewriter will return again index.php?route=common/home.

提交回复
热议问题