Jump to content
thirty bees forum

How do I redirect all product ect links?


Alex Hansen

Recommended Posts

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 🙂

 

Link to comment
Share on other sites

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();
    }

Link to comment
Share on other sites

  • 2 weeks 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...