Question

I have tried several examples of solutions that I have found here on StackOverflow but none of them seem to work correctly.

I have a Magento store that I need to redirect an old store code url to the new one. For example:

The old url looked like this.

www.example.com/something_en

In the above example I need to be able to modify any url that contains to the path something_en and change it to something like in the next example.

www.example.com/something

Any help is much appreciated.

Was it helpful?

Solution

Make sure this is your very first rule in main .htaccess:

RewriteEngine On

RewriteRule ^something_en(/.*)?$ /something$1 [L,NC,R=301]
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top