I need to make a 301 redirect for certain URLs from directory to variable.
EXAMPLE:
http://domain.com/es/stackoverflow --> http://domain.com/stackoverflow?lang=es
http://domain.com/he/stackoverflow --> http://domain.com/stackoverflow?lang=he
As it is now I have a "directory structure" for each language and it's making seperate URLs for the same page, it just switches the language.
I just want to add the language identifier at the end.
The thing is not every page had those language identifiers after the tld/
Any thoughts?
Thanks for your time.
You can try:
RedirectMatch 301 ^/([a-z]{2})/(.*)$ /$2?lang=$1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With