piotrmerton Posted November 17, 2020 Share Posted November 17, 2020 Hello, I am looking for some workaround for addressing 404 errors after disabling languages. By default the language parameter was included in all of the URLs - is there a way to force 301 redirection and avoid 404 error and to redirect from domain.com/lang/product.html to domain.com/product.html? Link to comment Share on other sites More sharing options...
rrataj Posted December 2, 2020 Share Posted December 2, 2020 You can do it at web server level, for example using .htaccess and mod_rewrite. Something like this should help: # Turn mod_rewrite on RewriteEngine On RewriteBase / RewriteRule ^lang/(.*)$ /$1 [L,NC,R=301] 1 Link to comment Share on other sites More sharing options...
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