开发者

How would I redirect requests for one page to another is IIS?

开发者 https://www.devze.com 2023-01-02 13:16 出处:网络
How would I redirect requests to a URL like http://www.mydomain.com/foo.aspx to another URL like http://www.mydomain.com/bar.aspx

How would I redirect requests to a URL like

http://www.mydomain.com/foo.aspx

to another URL like

http://www.mydomain.com/bar.aspx

in IIS.

Can开发者_StackOverflow this be done in IIS 6.0 or 7.0?


There are actually a few ways you can do it

1) Response.Redirect 2) Server.Transfer (though it will still appear as "foo.aspx" 3) Use URL Rewriting to redirect the user before it gets to ASP.NET

All can be done on both IIS6 and 7, although IIS6 would require an ISAPI URL Rewriting module, IIS7 has a module built in.

0

精彩评论

暂无评论...
验证码 换一张
取 消