Rewrite rules
-
Not truly WordPress specific
i need a rewrite rule for use with a WPML site that will add a language to a url if it is not found, WPML has been added with sub-directries and default language is to be shown
e.g:
https://www.mysite.com -> https://www.mysite.com/en/
https://www.mysite.com/en/ -> https://www.mysite.com/en/
https://www.mysite.com/fr/ -> https://www.mysite.com/fr/
https://www.mysite.com/?var=value&var2=value -> https://www.mysite.com/en/?var=value&var2=value
https://www.mysite.com/en/?var=value&var2=value -> https://www.mysite.com/en/?var=value&var2=value
https://www.mysite.com/fr/?var=value&var2=value -> https://www.mysite.com/fr/?var=value&var2=valuein essence, if the first 4 char after the site name are not /en/ or /fr/ then add /en/ to the url
i need it for both IIS and .htaccess
- The topic ‘Rewrite rules’ is closed to new replies.