Jump to content

Removing default language suffix from url


anriuz

Recommended Posts

How to remove default language suffix from urls in shop with multiple languages support? For example, site supports English and French, English is set as default language. But it still adds /en/ suffix to the pages urls.

Any solutions?

 

Link to comment
Share on other sites

  • 1 month later...
  • 8 months later...
  • 1 month later...
  • 2 weeks later...

Hi anruiz,

 

I am having a similar issue. Did you ever have any luck with this?

Which Prestashop version ?

 

For PS 1.5 and PS 1.6. you simply disable all languages, if you are using only one. Tab "localizatrion -> languages" - disable all languages which you don't want to show.

 

For already indexed sites, you should use a permanent redirect.

 

Add to your .htaccess this code:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^yourste.com/en [NC,OR]
RewriteCond %{HTTP_HOST} ^www.yourste.com/en [NC]
RewriteRule ^(.*)$ http://www.yourste.com/$1 [L,R=301,NC]

en is for English for ex. If your site was in other language you should change to the iso of the other language. Add this code to the top of your .htaccess on root of your shop, so as first lines, before Prestashop container code.

  • Like 2
Link to comment
Share on other sites

  • 7 years 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...