I’m adding languages to my wordpress blog. Until now, I had it under:
https://mywebsite.com/blog/
I’m using a wordpress extension https://wordpress.org/plugins/polylang/. All management is done under https://mywebsite.com/blog/, but frontend languages are under:
https://mywebsite.com/blog/es
https://mywebsite.com/blog/en
https://mywebsite.com/blog/fr
I would like to redirect all articles from my original blog in Spanish (which actually end by .html) to /blog/es/. For example:
https://mywebsite.com/blog/article1.html ยป https://mywebsite.com/blog/es/article1.html
Keeping in mind that this will only apply this type of urls. We could use .html as a filter.
I’ve tried different approaches. But they don’t work…
Thanks for your help
2
Answers
Thanks to @slauth comment, I ended up with the correct syntax:
For other people that are having trouble with this type of redirections, try always to isolate the redirection (remove other redirections that you're testing, in case there's a conflict).
So what did you try?
Something like this should work: