'Htaccess redirect to remove language
I've added inm my htaccess this code that I've found on this website: RedirectMatch 301 /en/(.) /$1 and RedirectMatch 301 /it/(.) /$1 My problem was to remove the language from the url, and it worked. But, because my english homepage is like https://www.mywebsite.it/en/ , when I'm in the english version of the website, and I click the logo to go to homepage, it will redirects to the italian homepage. I dont know how to fix this code adding a rule to not remove "/en/" from the homepage. Thank a lot.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
