Wednesday, 28 September 2016

Change Homepage SEO URL Opencart

This tutorial will be showing you how to change your opencart store homepage SEO URL. For this, I will be using my open cart dashboard and my cPanel file manager.

Homepage URL.

Go on your opencart dashboard, on the left-hand panel find system, once you have clicked on system you will see a menu underneath and you will need to click on settings
Dashboard - System [1] - Setting [2].

Once in the settings you will see several tabs at the top of the screen, you will need to click on server. Under the section general, you will see an option called 'use SEO URL's' this will be set to no, it needs  to be changed to yes. Click save and that's all for the dashboard.


Now to access your cPanel File Manager, you need to find seo_url.php (public_html/catalog/controller/common/seo_url.php). This file needs editing, once open find the line return $link; (line 128), Above this line add $link = str_replace('index.php?route=common/home', '', $link);. Your file will now look like this:

return $url_info['scheme'] . '://' . $url_info['host'] . (isset($url_info['port']) ? ':' . $url_info['port'] : '') . str_replace('/index.php', '', $url_info['path']) . $url . $query;
} else {
$link = str_replace('index.php?route=common/home', '', $link);
return $link;

Save this, refresh your store page and the URL will have changed.

With the change
Sam.


0 comments:

Post a Comment