Jump to content

Remove /content/ from CMS pages


Recommended Posts

Hello,

 

sure you can but you you'll need to define e new rule for url_rewriting.

That's to say by default the rule is :

RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*) /cms.php?id_cms=$1 [QSA,L]
RewriteRule ^content/category/([0-9]+)\-([a-zA-Z0-9-]*) /cms.php?id_cms_category=$1 [QSA,L]

 

And modifiy the source code to generate the cms link in class Link.php

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

 

The best could be to change "content" word by the word of your choice ... but if you wanna remove it completly ... you'll have to start or end your url by something to be able to know where to redirect to.

  • Like 2
Link to comment
Share on other sites

Hello,

 

sure you can but you you'll need to define e new rule for url_rewriting.

That's to say by default the rule is :

RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*) /cms.php?id_cms=$1 [QSA,L]
RewriteRule ^content/category/([0-9]+)\-([a-zA-Z0-9-]*) /cms.php?id_cms_category=$1 [QSA,L]

 

And modifiy the source code to generate the cms link in class Link.php

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

 

The best could be to change "content" word by the word of your choice ... but if you wanna remove it completly ... you'll have to start or end your url by something to be able to know where to redirect to.

 

Thank you very much

Link to comment
Share on other sites

  • 2 years later...

Hello,

 

sure you can but you you'll need to define e new rule for url_rewriting.

That's to say by default the rule is :

RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*) /cms.php?id_cms=$1 [QSA,L]
RewriteRule ^content/category/([0-9]+)\-([a-zA-Z0-9-]*) /cms.php?id_cms_category=$1 [QSA,L]
And modifiy the source code to generate the cms link in class Link.php

public function getCMSLink($cms, $alias = null, $ssl = false, $id_lang = NULL)
The best could be to change "content" word by the word of your choice ... but if you wanna remove it completly ... you'll have to start or end your url by something to be able to know where to redirect to.

 

Please tell me how to remove

/ content / category /

in the URL? PS 1.6

Link to comment
Share on other sites

  • 3 weeks later...
×
×
  • Create New...