Alex Hansen Posted February 2, 2023 Posted February 2, 2023 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 🙂
datakick Posted February 2, 2023 Posted February 2, 2023 This .htaccess rule might work. Didn't test it, thought RewriteRule ^da/(.*)$ /$1 [R=301,L] 1
e-com Posted February 3, 2023 Posted February 3, 2023 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(); }
Alex Hansen Posted February 14, 2023 Author Posted February 14, 2023 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now