How to add language mutation to url by Helicon ISAPI Rewrite

51 Views Asked by At

we have web with nice url by Helicon ISAPI Rewrite and now we adding 3 language mutations (/en, /de, /ru) and I need to know how to create rewrite rule (redirect) which will add default lang mutation (/en) to the URL, when it does not exists in incoming URL

www.mydomain.com/de/gallery/ -> nothing happend

but

www.mydomain.com/gallery/ -> I need redirect to www.mydomain.com/en/gallery/

Can you help me, please? THX

1

There are 1 best solutions below

0
On

Try this:

RewriteCond %{REQUEST_URI} !^(/de/)|(/en/)|(/ru/) [NC]
RewriteRule (.*) en/$1 [R]