I need some help with mod_rewrite doing multiple things to the url procedurally:
-
If the url starts with en,es,pt-br, remove it and add ?lang=$1
-
If the url does not next have ‘web/’ in it, add it.
-
If the url is blank, go to ‘web/en/’
-
None of them should actually rewrite the url
This means:
http://www.domain.com/en >> http://www.domain.com/web/?lang=en
http://www.domain.com/en/mobile >> http://www.domain.com/mobile/?lang=en
Try: