Jump to content

Force redirection from /en to /pl


Recommended Posts

Hi,

is there a way to force prestashop to redirect any customers from mywebsite.pl/en to mywebsite.pl/pl as I don't really have english version of website but having 2 languages is a leftover from a previous version.

 

Disabling english language is not an option as it automatically removes /pl and it is very bad for SEO.

 

Is it possible?

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

Add to your .htaccess a moved permanently

 

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.

 

You don't need to add /pl if you are using only one language now!

Link to comment
Share on other sites

Add to your .htaccess a moved permanently

 

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.

 

You don't need to add /pl if you are using only one language now!

 

Thanks for the reply.

I've added the code you posted so now my .htaccess file contains:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^lawendowykredens.pl/en [NC,OR]
RewriteCond %{HTTP_HOST} ^www.lawendowykredens.pl/en [NC]
RewriteRule ^(.*)$ http://www.lawendowykredens.pl/$1 [L,R=301,NC]
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]

But when I enter www.lawendowykredens.pl/en nothing happens

Should I do something else?

Link to comment
Share on other sites

You should not add the lines into the block which Prestashop generates. The last two lines are a part of the original Prestashop rewrite bloc.

# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# http://www.prestashop.com - http://www.prestashop.com/forums 

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

You should add the lines BEFORE to that bloc.

 

so the result is:

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

# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# http://www.prestashop.com - http://www.prestashop.com/forums

 .....
Edited by selectshop.at (see edit history)
Link to comment
Share on other sites

I don't know my server OS as it is VPS, PS 1.6.0.9

my .htaccess is:


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

# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# http://www.prestashop.com - http://www.prestashop.com/forums

<IfModule mod_rewrite.c>
<IfModule mod_env.c>
SetEnv HTTP_MOD_REWRITE On
</IfModule>

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]
</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>

FileETag INode MTime Size
<IfModule mod_deflate.c>
	<IfModule mod_filter.c>
		AddOutputFilterByType DEFLATE text/html text/css text/javascript application/javascript application/x-javascript
	</IfModule>
</IfModule>

#If rewrite mod isn't enabled
ErrorDocument 404 /index.php?controller=404

# ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again

RewriteRule ^(.*)$ http://www.lawendowykredens.pl/$1 [L,R=301,NC]
Edited by letrof (see edit history)
Link to comment
Share on other sites

Yes it is Linux -

 

Server: Apache/2
X-Powered-By: PHP/5.3.25

 

http://infoyr.com/www/lawendowykredens.pl

 

Back to your problem:

 

The last block on your topic #7 is where ?

RewriteRule ^(.*)$ http://www.lawendowykredens.pl/$1 [L,R=301,NC]


If you take a look it is already included in the first lines block, so you don't need it extra again. Delete the whole block I gave you as solution. It seems that your server is not understanding the conditions. I will make some tests with your php-version in use and come back soon.

Link to comment
Share on other sites

Thank you very much, this one works!

 

[EDIT]

 

I think I've marked it too soon. My server seems to do nothing with the new .htaccess file

Should the code you posted be in the begining of the file or in the "prestashop section"?

 

Now it is:

# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# http://www.prestashop.com - http://www.prestashop.com/forums

<IfModule mod_rewrite.c>
<IfModule mod_env.c>
SetEnv HTTP_MOD_REWRITE On
</IfModule>

RewriteEngine on
RewriteRule www.lawendowykredens.pl/en  www.lawendowykredens.pl/pl [R=301,L]
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]

# Images
Edited by letrof (see edit history)
Link to comment
Share on other sites

Not really, I see .pl/pl, so not working the rewrite I told you. Polish is the unique language activated on your back-office ? English is disabled ? If yes you should regenerate your .htaccess. Something going wrong on your rewrite rules. I think it is a server problem. Cause the first code I told you should work and the second one on really EVERY server, independent of the php version.

 

Not the first is working and also not the second.

 

Regenerate the .htaccess by changing a setting on back-office, save this and undo by saving it again. Is your .htaccess having now the date and time of today (check on FTP). If yes the file is writable. Make this but only after deactivated english. It seems to be active, but not selectable, cause the module is deactivated/deinstalled. Bit I can still access: http://www.lawendowykredens.pl/en/. If English is not activated, than correct rewrite should be a 404 site. But this is not the case.

Edited by selectshop.at (see edit history)
Link to comment
Share on other sites

 

Thank you very much, this one works!

 

[EDIT]

 

I think I've marked it too soon. My server seems to do nothing with the new .htaccess file

Should the code you posted be in the begining of the file or in the "prestashop section"?

 

Now it is:

# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# http://www.prestashop.com - http://www.prestashop.com/forums

<IfModule mod_rewrite.c>
<IfModule mod_env.c>
SetEnv HTTP_MOD_REWRITE On
</IfModule>

RewriteEngine on
RewriteRule www.lawendowykredens.pl/en  www.lawendowykredens.pl/pl [R=301,L]
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]

# Images

As I told you the code you have to insert SHOULD be BEFORE the Prestashop native one, so before #start---- You again included it inherit from the Presta code. this is wrong.

 

Your .htaccess should be this one:

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

# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# http://www.prestashop.com - http://www.prestashop.com/forums

<IfModule mod_rewrite.c>
<IfModule mod_env.c>
SetEnv HTTP_MOD_REWRITE On
</IfModule>


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]
</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>

FileETag INode MTime Size
<IfModule mod_deflate.c>
    <IfModule mod_filter.c>
        AddOutputFilterByType DEFLATE text/html text/css text/javascript application/javascript application/x-javascript
    </IfModule>
</IfModule>

#If rewrite mod isn't enabled
ErrorDocument 404 /index.php?controller=404

# ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
Edited by selectshop.at (see edit history)
Link to comment
Share on other sites

Concerning SEO, besides the language problem your site has a bad SEO.

 

There are missing all meta-description on your products and no unique content on your products, cause you didn't added any descriptions to them.

 

Keywording is missing. There are several keywords without any weight or relation to your products on your general content.

 

There are missing opengraph and richsnipets.

 

You should rework your products by adding to them unique content (product description added by your own, not copied from somewhere), add meta-description to them. and give a weight to some keywords on your site, which specify the speciality of the site.

Opengrap and rich snippets are a plus on serps for a site....

Link to comment
Share on other sites

Concerning SEO, besides the language problem your site has a bad SEO.

 

There are missing all meta-description on your products and no unique content on your products, cause you didn't added any descriptions to them.

 

Keywording is missing. There are several keywords without any weight or relation to your products on your general content.

 

There are missing opengraph and richsnipets.

 

You should rework your products by adding to them unique content (product description added by your own, not copied from somewhere), add meta-description to them. and give a weight to some keywords on your site, which specify the speciality of the site.

Opengrap and rich snippets are a plus on serps for a site....

 

Tht's because you look at the english version which I don't use and therefore it's empty. Polish version has everything mentioned above.

 

for example: http://www.lawendowykredens.pl/pl/poduszki-francuskie/1737-poduszki-ozdobne.html

 

So to be sure that I understand everything. If I don't use english language I can turn it off?

If I do that there will be no /pl in the address aswell and I have some external incoming links like "lawendowykredens.pl/pl/[...]". Will they work if I turn the english language off and therefore there will be no /pl?

 

I would turn off the english language long time ago but I am so affraid of SEO impact.

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

Yes you should turn it off, otherwise your page will never be  www.lawendowykredens.pl. you will have avilable alwayst boths languages... BUT please do not delete English, just disable.

 

For to rewrite allready indexed /pl/pl and PL/en/ pages you should use the .htaccess I added to my last topic#14.

Link to comment
Share on other sites

Yes you should turn it off, otherwise your page will never be  www.lawendowykredens.pl. you will have avilable alwayst boths languages... BUT please do not delete English, just disable.

 

For to rewrite allready indexed /pl/pl and PL/en/ pages you should use the .htaccess I added to my last topic#14.

thank you again!

 

Just one more concern. Does this rule include .pl/pl redirection to.pl?

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

# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution

Or should I add those two lines too:

RewriteCond %{HTTP_HOST} ^lawendowykredens.pl/pl [NC,OR]
RewriteCond %{HTTP_HOST} ^www.lawendowykredens.pl/pl [NC]
Link to comment
Share on other sites

Sorry, no, I forgot. Yes of course there are two lines more with the same sheme. So the block is:

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

As your site already redirects to www. it is possible that you ommit the files with ^lawendowykredens, so the block is than only this:

RewriteEngine on

RewriteCond %{HTTP_HOST} ^www.lawendowykredens.pl/en [NC]
RewriteCond %{HTTP_HOST} ^www.lawendowykredens.pl/pl [NC]
RewriteRule ^(.*)$ http://www.lawendowykredens.pl/$1 [L,R=301,NC]

Good luck, and keep me informed.

Link to comment
Share on other sites

ok,

so now my .htaccess looks like this:

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

# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again

I've disabled english language, so now my page is www.lawendowykredens.pl

but when i try to click some old links for example:

http://www.lawendowykredens.pl/pl/zegary-scienne/2347-zegary-scienne.html

I get 404 error. Do I have to do something else I don't know like force compile clear cache or something?

Link to comment
Share on other sites

English is not disabled. The rewrite is not working on your site. I cannot say why. You should contact your hosting provider and tell him the problem. BUT BEFORE: did you cleared all caches ? Smarty and browser ?

 

If I open your site: www.lawendowykredens.pl so it opens : http://www.lawendowykredens.pl/en/ sign for me that rewrite is not working and English is activated.

 

I think your theme has some cache which you should deleted, nevertheless manually if other does not work.

 

Go to your FTP folder /themes/furniture and see if there is a folder /cache. If yes you should delete ALL FILES!!! BUT not index.php.

Edited by selectshop.at (see edit history)
Link to comment
Share on other sites

  • 5 weeks later...

English was disabled for a while, but after I got a lot of 404 errors i've turned it on again.

When I disable it my page works fine without annoying /pl but when someone clicks an old link for example

http://www.lawendowykredens.pl/pl/zegary-scienne/4162-zegar-z-lawenda.html

 

he/she gets 404 page not found.

I want to redirect

http://www.lawendowykredens.pl/pl/zegary-scienne/4162-zegar-z-lawenda.html to

http://www.lawendowykredens.pl/zegary-scienne/4162-zegar-z-lawenda.html

 

but just can't make this work, i've deleted the cache, force compile on. Beside that rewrite works fine. No idea what to do. the /en site is totally not ready for a sale and I don't want it. Yesterday I got a phone call from a client from London, and he was asking where exactly my shop is in GLASGOW?

Please help me!

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

  • 1 year later...

sorry for digginh out he old post, but I still have the problem. Somebody can please help me with either redirect all */en to */pl or remove both of them but keep rediection of "old links".

 

Please!

Link to comment
Share on other sites

To remove both of them, simply deactivate al languages of your shop and let only one (the main one of your shop, which is pl). After these delete the smarty cache and cache of your browser and regenerate your .htaccess. If this does not solve, so it's a problem of your theme and you should revert for assistance to the developer of the theme.

Link to comment
Share on other sites

Hi, thanks for the reply but again if I disable english and regenerate the .htaccess and then go to www.lawendowykredens.pl/en i get 404.

Disabling english does not redirects all .pl/pl and .pl/en to .pl/

What it has to do with the theme?

Link to comment
Share on other sites

Now there are 2 active languages on my page because so there is no forcing 2 languages. When I disable english and leave only polish then /en and /pl dissapears as it should be but when I try to enter www.lawendowykredens.pl/en after disabling english it gives me 404 instead of redirect to lawendowykredens.pl. This has nothing to do with the theme.

Link to comment
Share on other sites

If you created a new .htaccess after changing to only one language, and it is redirecting to a wrong page, instead to a URL without any language short code, than of course it is a problem of your theme. It forces the need of two languages on redirection. Please ask the developer. Or the theme is coded wrong, or it is not compatible with your server settings.

Link to comment
Share on other sites

I think there is some misunderstanding.

Nothing forces or redirects to something.

 

When I disable english my site is www.lawendowykredens.pl and that is ok! No redirections.

But when I manualy type the address www.lawendowykreden.pl/en i get 404 and I want to be redirected to www.lawendowykredens.pl

 

Hopefuly it is clear now.

Link to comment
Share on other sites

There is no misunderstanding. Your theme is redirecting to wrong location. Your server is doing well, but a script in theme is forcing another URL. See here what you can see with firebug and DOM location/network analysis:

toJSON  - undefined
hash - ""
host - "www.lawendowykredens.pl"
hostname - "www.lawendowykredens.pl"
href - "http://www.lawendowykredens.pl/pl/poduszki-tekstylia-dywany/1737-poduszki-ozdobne.html"
origin - "http://www.lawendowykredens.pl"
pathname - "/pl/poduszki-tekstylia-dywany/1737-poduszki-ozdobne.html"
port - ""
protocol - "http:"
search - ""

 

host and hostname coming from your server are correct. pathname (coming form theme settings) is not correct.

Link to comment
Share on other sites

  • 5 years later...
On 5/29/2017 at 10:11 AM, letrof said:

I think there is some misunderstanding.

Nothing forces or redirects to something.

 

When I disable english my site is www.lawendowykredens.pl and that is ok! No redirections.

But when I manualy type the address www.lawendowykreden.pl/en i get 404 and I want to be redirected to www.lawendowykredens.pl

 

Hopefuly it is clear now.

I can see on your website you finally managed to fix the issue? I have same issue now. Can you tell me how to fix it? 

Link to comment
Share on other sites

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