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:
http://www.mysite.com -> http://www.mysite.com/en/
http://www.mysite.com/en/ -> http://www.mysite.com/en/
http://www.mysite.com/fr/ -> http://www.mysite.com/fr/
http://www.mysite.com/?var=value&var2=value -> http://www.mysite.com/en/?var=value&var2=value
http://www.mysite.com/en/?var=value&var2=value -> http://www.mysite.com/en/?var=value&var2=value
http://www.mysite.com/fr/?var=value&var2=value -> http://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.