开发者

Redirecting to login page if user enters root path

I've got a VB.net web app, and its start page is http:\\<myServer>\<myApp>\webforms\login.aspx

I'd rather they didn't have to enter this whole address. Is there a simple way to 开发者_JAVA百科redirect my users to this page if they just enter the root i.e. http:\\<myServer>\<myApp>\ ?


Assuming you have not changed the default pages in IIS, just setup a default.aspx on the root that redirects to the login.aspx page.


Another thought is to use URL Routing if you are using ASP.Net 3.5 or 4.0. Here is a link - https://web.archive.org/web/20201205221404/https://www.4guysfromrolla.com/articles/051309-1.aspx The page is specific to 3.5 SP 1, but there is another link on the page for 4.0. So you might use http:\\\login and it will route to http:\\\webforms\login.aspx. HTH

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜