I currently have User SEO URL\'s
set to Yes in OpenCart Admin.
System -> Settings -> Store -> Server -> User SEO URL\'s
First of all in root folder of your website rename htaccess.txt into .htaccess.
Then go to System > Settings > Your store. Edit. Open tab Server and set Use SEO URLs to Yes.
Now open catalog/controller/startup/seo_url.php
Find } elseif ($key == 'path') {
Add before
} elseif ($key == 'route') {
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "seo_url WHERE `query` = '" . $this->db->escape($value) . "' AND store_id = '" . (int)$this->config->get('config_store_id') . "' AND language_id = '" . (int)$this->config->get('config_language_id') . "'");
if ($query->num_rows && $query->row['keyword']) {
$url .= '/' . $query->row['keyword'];
unset($data[$key]);
} else if ($data['route'] == "common/home") {
$url .= '/';
}
Now /index.php?route=common/home
becames /
And now you can although set SEO URLs in Design > SEO URL using constructions like account/login or information/contact.