Jump to content

Solution for SEO friendly URL


thepower

Recommended Posts

We have work for a solution for friendly url. Like this

http://thepowerbirds...t/seo-solutions

 

We have make this in CMS (delete url ID) if you have 2 language or more.

we work for "products Id url" now. If someone have a solution for this, we do not need to spend our time on it.

 

Go to "dir" classes/Link.php on line 155. and disable /* - */

 

public function getCMSLink($cms, $alias = null, $ssl = false, $id_lang = NULL)

{

$base = (($ssl AND Configuration::get('PS_SSL_ENABLED')) ? Tools::getShopDomainSsl(true) : Tools::getShopDomain(true));

 

if (is_object($cms))

{

return ($this->allow == 1) ?

($base.__PS_BASE_URI__.$this->getLangLink((int)($id_lang)).'content/' /*.(int)($cms->id).'-'*/.$cms->link_rewrite) :

($base.__PS_BASE_URI__.'cms.php?id_cms='.(int)($cms->id));

}

 

if ($alias)

return ($this->allow == 1) ? ($base.__PS_BASE_URI__.$this->getLangLink((int)($id_lang)).'content/'/*.int($cms).'-'*/ .$alias) :

($base.__PS_BASE_URI__.'cms.php?id_cms='.(int)($cms));

return $base.__PS_BASE_URI__.'cms.php?id_cms='.(int)($cms);

}

 

In your httaccess-fil

Write your cms link.

RewriteRule ^content/your cms link$ /cms.php?id_cms=Cms ID$1 [QSA,L,E]

if you have 2 language.

RewriteRule ^en/content/your cms link$ /cms.php?id_cms=Cms ID$1 [QSA,L,E]

Edited by thepower (see edit history)
Link to comment
Share on other sites

  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...