Hello,
I have a question, is it possible to remove the index.php?route=common/home part for all links referring to Home, so that http://site.com/index.php?route=common/home becomes just http://site.com/ ?
I think it's not good for SEO to have two home URLs with duplicate content
I have a question, is it possible to remove the index.php?route=common/home part for all links referring to Home, so that http://site.com/index.php?route=common/home becomes just http://site.com/ ?
I think it's not good for SEO to have two home URLs with duplicate content
I think won't stop Google from indexing the http://site.com/index.php?route=common/home page.
Maybe the better solution is to remove all these links in the controller:
I wonder, what was the reason to use the 1st variant and not the 2nd for all pages in the controller?
Maybe the better solution is to remove all these links in the controller:
Code: Select all
$this->document->breadcrumbs[] = array(
'href' => HTTP_SERVER . 'index.php?route=common/home',
...
Code: Select all
$this->document->breadcrumbs[] = array(
'href' => HTTP_SERVER,
...
see this post for a better way of doing it and also making all the other index.php?route= urls more SEO friendly
http://forum.opencart.com/viewtopic.php ... 72#p164179
http://forum.opencart.com/viewtopic.php ... 72#p164179
Bit late to the party, but it seems there are loads of ways to do this.
If, like me, you like abit of hackery, you can put this hack into catalog > controller > common > seo_url.php (assuming V1.5.6)
find (near bottom):
replace with:
Simple enough. I know it's hacking core files, but let's face it, we're not going to be upgrading a client's site anytime soon... and it works, everytime
If, like me, you like abit of hackery, you can put this hack into catalog > controller > common > seo_url.php (assuming V1.5.6)
find (near bottom):
Code: Select all
} else {
return $link;
}
Code: Select all
} else {
if(strpos($link,'index.php?route=common/home')){
$link = str_replace('index.php?route=common/home','',$link);
}
return $link;
}
Ronald Laughton is the worst referee in Rugby League
Worked a treat - is there a similar way for changing the file path names for account/checkout etc?Bit late to the party, but it seems there are loads of ways to do this.
If, like me, you like abit of hackery, you can put this hack into catalog > controller > common > seo_url.php (assuming V1.5.6)
find (near bottom):
Code: Select all
} else {
return $link;
}
replace with:
Code: Select all
} else {
if(strpos($link,'index.php?route=common/home')){
$link = str_replace('index.php?route=common/home','',$link);
}
return $link;
}
Simple enough. I know it's hacking core files, but let's face it, we're not going to be upgrading a client's site anytime soon... and it works, everytime
Who is online
Users browsing this forum: No registered users and 51 guests