简体   繁体   中英

How to add language mutation to url by Helicon ISAPI Rewrite

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

Try this:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM