iis 7 - IIS redirect url for virtual directory -


how can set redirect url virtual directory in iis 7.0? have installed latest url rewrite module 2.x.

i can explain problem example:

i have website on iis 7.0 server, www.mysite.com. decided create virtual directory "sales" under site pointing website root directory. need create redirect url vdir. vdir pointing same virtual root directory site root.

the big idea can go www.mysite/sales , automatically redirect www.mysite.com?productid=200.

i tried redirect rewrite url vdir(not website), error message:

cannot add duplicate collection entry of type 'rule' unique key  attribute 'name' set "test". 

this happens when pointing virtual vdir , try add rule.

i can add rules website level, rules don't work. mean url "www.mysite/sales" gives me following error. know key unique. checked web.config.

this kind of feature easy use in iis 6.0, point @ vdir mouse , set properties-->a redirect url.

please 1 explain right way in iis 7.0?

actually not quite easy, not horrible.

1) create physical directory instead of virtual directory.

2) make sure have http redirect role services. see http://www.iis.net/configreference/system.webserver/httpredirect

3) open iis manager , browse physical directory want redirect.

4) double click on 'http redirect' icon under iis.

5) check "redirect requests destination" box , enter new url (http://example.com/newpage.html)

6) check next 2 boxes needed; find necessary check both.

7) press apply button.

8) select web site , 'restart' under manage web site.

9) test.


Comments

Popular posts from this blog

Delphi Wmi Query on a Remote Machine -