Jump to content
maio

remove language extensions through htaccess

Recommended Posts

In this post you'll find the magic code to add to the .htaccess in order to redirect a language extension page (.ie : www.yourshop/shop/en/* to --> www.yourshop/shop/*)

 

 

the classic scenario is that you open a shop with multilanguage , you fill it up with cool content, and start to going up on google-rank ...

since most of the shops start out local you'll probably have contents in just one language,

in order to avoid duplicate content you'll turn to single language;

at this point your (friendly)url will drop down the language extension (www.yourshop/shop/en/*)

so all your indexed pages won't correspond to the actual url and the google-genius will get suspicious_

(those who have gone through this know it's a nightmare for somebody that's working on SEO)

 

the best solution is to insert a redirect rule in the htaccess code that is generated in the home dir,

this is it:

 

RewriteRule ^en/(.*)$ /shop/$1 [R=302,L]

 

(in a scenario like the one above www.yourshop/shop/en/* to --> www.yourshop/shop/*)

 

_______________________

 

if your site is directly in the root go for:

 

RewriteRule ^en/(.*)$ /$1 [R=302,L]

 

you need to add the code after the ...... {ENV:REWRITEBASE}

 

 

 

Hope this can help as much as it helped me:

  • Like 7

Share this post


Link to post
Share on other sites

I am not so sure it is that simple - have you REALLY implemented this, and in which version of Prestashop?

certainly it is not so simple in 1.4*

Also, 302 redirect is not best practice.

Edited by TheCoffeeLocator (see edit history)

Share this post


Link to post
Share on other sites

It can work in any version,

 

if you eventually regenerate the htaccess you have to add it again,

(htaccess is regenerated if you turn on/off friendly urls)

 

why do you say 302 is not good?

 

it works either with 302 or 301

302 is temporary

301 is permanent

Share this post


Link to post
Share on other sites

It works, but when I change a language and I return to the default language I see the following warning:

 

[Debug] This page has moved

Please use the following URL instead: XX

 

I can't return to the default language..

Share this post


Link to post
Share on other sites

hi gazapko,

 

did you solve ?

what PS version are you using?

Share this post


Link to post
Share on other sites

i cant get it to work

 

i have 2 languages in my site , hebrew & english

but even after i marked hebrew as my front office default language

he still going to - myadmin.co.il/en/

instead of myadmin.co.il/he/

Share this post


Link to post
Share on other sites

i cant get it to work

 

i have 2 languages in my site , hebrew & english

but even after i marked hebrew as my front office default language

he still going to - myadmin.co.il/en/

instead of myadmin.co.il/he/

 

did you remember to clear your browser cache and cookies? ps will remember the language you last used until the cookies expire or your clear them

Share this post


Link to post
Share on other sites

i think i had it fixed.

 

1 question,

 

how do i forwarding site to go to "myadmin.co.il" and not to "myadmin.co.il/he/"

Edited by ilan316 (see edit history)

Share this post


Link to post
Share on other sites

if you have 2 languages prestashop will add that extension in order for you to have more than 1 language ,

 

if you have no multilanguage than you'll have regular friendly_urls ,

(like the ones you ask for)

Share this post


Link to post
Share on other sites

I have 2 languges , but im using only 1 Languge (Hebrew) in the Front Office - costumer cant choose Languge .

And English Languge in the Back Office

Share this post


Link to post
Share on other sites

In this post you'll find the magic code to add to the .htaccess in order to redirect a language extension page (.ie : www.yourshop/shop/en/* to --> www.yourshop/shop/*)

 

 

the classic scenario is that you open a shop with multilanguage , you fill it up with cool content, and start to going up on google-rank ...

since most of the shops start out local you'll probably have contents in just one language,

in order to avoid duplicate content you'll turn to single language;

at this point your (friendly)url will drop down the language extension (www.yourshop/shop/en/*)

so all your indexed pages won't correspond to the actual url and the google-genius will get suspicious_

(those who have gone through this know it's a nightmare for somebody that's working on SEO)

 

the best solution is to insert a redirect rule in the htaccess code that is generated in the home dir,

this is it:

 

RewriteRule ^en/(.*)$ /shop/$1 [R=302,L]

 

(in a scenario like the one above www.yourshop/shop/en/* to --> www.yourshop/shop/*)

 

_______________________

 

if your site is directly in the root go for:

 

RewriteRule ^en/(.*)$ /$1 [R=302,L]

 

you need to add the code after the ...... {ENV:REWRITEBASE}

 

 

 

Hope this can help as much as it helped me:

 

Thanks Maio, This is worked For me...

  • Like 1

Share this post


Link to post
Share on other sites

@ilan316

 

1 question,

 

how do i forwarding site to go to "myadmin.co.il" and not to "myadmin.co.il/he/"

 

try this:

 

RewriteRule ^he/(.*)$ /$1 [R=301,L]

Share this post


Link to post
Share on other sites

I’m using multistore in combination with multi language, is it possible that this rewrite url doesn't work with multistore.

 

 

RewriteRule ^en/(.*)$ /$1 [R=302,L]

 

And why you don't use first an RewriteCond?

Edited by bonjourwebshops (see edit history)

Share this post


Link to post
Share on other sites

why should you define a condition?

 

rewrite rule works in .htaccess (it's about url redirection),

it has nothing to do with the structure of your site;

 

give me a practical example of what you need,

Share this post


Link to post
Share on other sites

Hi Maio,

 

About the RewriteCond was just an question,

 

But when i use the rewrite url in htacces to hide the language code, i'm not able to login or create an account?

 

Also i need to turn off the ‘’Automatically redirect to the canonical URL’’ because otherwise it gives an redirect error.

 

Do you had also this error and issues?

Share this post


Link to post
Share on other sites

in my situation this solution is working fine, so far;

 

maybe your site's settings are different...

Share this post


Link to post
Share on other sites

Thank you Maio, it worked for me also and saved a lot of efforts.

 

I had only a problem where to put the code, but finally line 23 was the solution.

 

[21] RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]

[22] RewriteRule ^ro/(.*)$ /$1 [R=302,L]

Share this post


Link to post
Share on other sites

Hello,

 

I had a similar problem because my site had the /en extension and I wanted to get rid of it. For some reason in the languages tab there were both USA english and GB english. (maybe because prestashop defaults to USA english from the initial install and I'm in the UK? Don't know).

 

Sorry to sound like a noob but the way I approached it was that I went to language settings and (localization -> languages) and I ticked on the 2nd language and disabled it. Then when i visited my site WITHOUT the /en extension it worked fine.

 

In regards to the redirect I don't think I'm going to worry about it too much as when people visit your site (store) they rarely, if never add the /en extention at the end. It is always with or without the "www".

 

Just my experience from it. Don't know if it helps... I am very new to prestashop.

Share this post


Link to post
Share on other sites

This didn.t work for me.

 

I have 2 languages, English and Spanish, but what I need is to remove the "/en/" from links, just for english links. how can I do that?.

Share this post


Link to post
Share on other sites

hi luchiniii,

RewriteRule ^en/(.*)$ /$1 [R=302,L]

this doesn't work?

is your shop in a different directory than root?

you placed the redirect in the right place?

Edited by maio (see edit history)

Share this post


Link to post
Share on other sites

Hi guys, so I tried to use the code in the .htaccess and it works fine. But if I set the media servers configuration, even I write again the code in the same place it doesn't work.

 

My version 1.5.6.2.

 

Did anybody find the same problem?

Share this post


Link to post
Share on other sites

Hello. Where exactly should be placed in  Prestashop 1.6

 
<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>
 
<IfModule mod_rewrite.c>
<IfModule mod_env.c>
SetEnv HTTP_MOD_REWRITE On
</IfModule>
 
 
# Disable Multiviews
Options -Multiviews
 
RewriteEngine on
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]
 
# Images
RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L]
RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L]
RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L]
RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L]
# AlphaImageLoader for IE and fancybox
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]
 
# Dispatcher
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L]
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]
 
# Images
RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L]
RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L]
RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L]
RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L]
# AlphaImageLoader for IE and fancybox
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]
 
# Dispatcher
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L]
</IfModule>
 
AddType application/vnd.ms-fontobject .eot
AddType font/ttf .ttf
AddType font/otf .otf
AddType application/x-font-woff .woff
 
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType text/css "access plus 1 week"
ExpiresByType text/javascript "access plus 1 week"
ExpiresByType application/javascript "access plus 1 week"
ExpiresByType application/x-javascript "access plus 1 week"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresByType image/svg+xml "access plus 1 year"
ExpiresByType image/vnd.microsoft.icon "access plus 1 year"
ExpiresByType application/font-woff "access plus 1 year"
ExpiresByType application/x-font-woff "access plus 1 year"
ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
ExpiresByType font/opentype "access plus 1 year"
ExpiresByType font/ttf "access plus 1 year"
ExpiresByType font/otf "access plus 1 year"
ExpiresByType application/x-font-ttf "access plus 1 year"
ExpiresByType application/x-font-otf "access plus 1 year"
</IfModule>
Tnx.

Share this post


Link to post
Share on other sites

solution they stated doesnt work with prestashop version 1.6. I will put some effords when i have time to make it work. And i can post the solution here, if i can 

 

 

Hello. Where exactly should be placed in  Prestashop 1.6

 
<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>
 
<IfModule mod_rewrite.c>
<IfModule mod_env.c>
SetEnv HTTP_MOD_REWRITE On
</IfModule>
 
 
# Disable Multiviews
Options -Multiviews
 
RewriteEngine on
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]
 
# Images
RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L]
RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L]
RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L]
RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L]
# AlphaImageLoader for IE and fancybox
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]
 
# Dispatcher
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L]
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]
 
# Images
RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L]
RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L]
RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L]
RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L]
# AlphaImageLoader for IE and fancybox
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]
 
# Dispatcher
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L]
</IfModule>
 
AddType application/vnd.ms-fontobject .eot
AddType font/ttf .ttf
AddType font/otf .otf
AddType application/x-font-woff .woff
 
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType text/css "access plus 1 week"
ExpiresByType text/javascript "access plus 1 week"
ExpiresByType application/javascript "access plus 1 week"
ExpiresByType application/x-javascript "access plus 1 week"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresByType image/svg+xml "access plus 1 year"
ExpiresByType image/vnd.microsoft.icon "access plus 1 year"
ExpiresByType application/font-woff "access plus 1 year"
ExpiresByType application/x-font-woff "access plus 1 year"
ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
ExpiresByType font/opentype "access plus 1 year"
ExpiresByType font/ttf "access plus 1 year"
ExpiresByType font/otf "access plus 1 year"
ExpiresByType application/x-font-ttf "access plus 1 year"
ExpiresByType application/x-font-otf "access plus 1 year"
</IfModule>
Tnx.

 

Share this post


Link to post
Share on other sites

I have been trying to redirect all /en/ to a site without /en/ too but have been unsuccessful. When I click the link on google with /en/, it gives a 404 error and does not re-direct.

 

Prestashop 1.6.0.9 here, have anyone successfully done it using htaccess?

Share this post


Link to post
Share on other sites

Hi, i tried some but I got a blank page with google ERR_TOO MANY REDIRECTS

 

in my server, prestashop is not in the root, he is in a /prestashop/ folder but redirected by domain. 

 

i want to remove the /fr/ in my domain : www.araclouds.com/fr/ to www.araclouds.com

 

any help would be very appreciated :)

 

thanks in advance

  • Like 1

Share this post


Link to post
Share on other sites

Hi at all.

I have 2 language in my store.

Italian (default) and english.

i See that for each language is possible to have this url:

shop.domain.com

shop.domain.com/it

shop.domain.com/it/

 

shop.domain.com

shop.domain.com/en

shop.domain.com/en/

 

What i would is to have only one url for each language.

for italian: shop.domain.com/it/

for english: shop.domain.com/en/

 

Ho can i fix this by .htaccess ?

 

Thank you at all for support.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More