Jump to content
thirty bees forum

Recommended Posts

Posted

Hi

I wish to erase English lang on my shop and then only use Danish, as we only have danish custemers, but when/if I disable the English lang, my links changed and google sent to wrong address and get 404 😞
 

So I think there must be a way of changed the htaccess (or something) from:

https://www.sportspower.dk/da/*

to

https://www.sportspower.dk/* 

 

Hope someone can help me with that one 🙂

 

Posted

If you want to have a permanent redirection of all erroneous URLs to home page, then do an override of initContent() method in PageNotFoundController:

    public function initContent()
    {
        header('HTTP/1.1 301 Moved Permanently');
        Tools::redirect(__PS_BASE_URI__);
        exit();
    }

  • 2 weeks later...
Posted
On 2/2/2023 at 5:08 PM, datakick said:

This .htaccess rule might work. Didn't test it, thought

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

Thanx datakick - It looks like it works.

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