IIS redirect url for virtual directory
- by Jouni
Hello,
How i can set redirect url for virtual directory in iis 7.0.I have installed lates url rewrite module 2. ?
I could explain my problem with exsample.
I have website on my iis 7.0 server:
www.mysite.com
I desided to create virtual directory sales under my site which is pointing to website root directory.Now I need create redirect url for the vdir. The vdir is pointing same virtual root directory as my site root is
The big idea is that i can write on browser www.mysite/sales and i will automaticly redirect to url www.mysite.com?productid=200.
I tried to make redirect with rewite url for vdir(not website), but I always get this error message :
cannot add duplicate colletion entry of type 'rule' with unique key key attribute 'name' set to "test".This happens when i am pointing for virtual vdir and try to add rule.
I can add rules to website level,but rules doesn work. I mean url www.mysite/sales gives me follwing error. I know that key is unique I checked it from web.config.
This kind of feature was really easy use in IIS 6.0, just point vdir with your mouse and set properties--a redirect to url.
Please some one explain what is right way to do it in IIS 7.0