forms authentication asp.net vb

前端 未结 3 2008
野趣味
野趣味 2021-01-16 20:38

I have a log in page which is the home page so is located at www.domainname.com

when someone goes to this page it adds a returnurl to the string so they are at:

相关标签:
3条回答
  • 2021-01-16 20:55

    Yes, we can use the above solution. One problem here is when we are using SEO implementation. To achieve your requirement, you can use URLRewrite.

    http://weblogs.asp.net/scottgu/archive/2010/04/20/tip-trick-fix-common-seo-problems-using-the-url-rewrite-extension.aspx

    0 讨论(0)
  • 2021-01-16 21:02

    Well i seemed to have done it a bit by luck.

    I just changed

    <authentication mode="Forms">
        <forms protection="All" loginUrl="default.aspx" defaultUrl="~/home/" />
    </authentication>
    

    To

    <authentication mode="Forms">
        <forms protection="All" loginUrl="/" defaultUrl="~/home/" />
    </authentication>
    
    0 讨论(0)
  • 2021-01-16 21:10

    You should send them to the page you want them to default to. What you should do is create the login page on a seperate page (login.aspx) for instance and then make the default.aspx page the home page. Then when they go to default.aspx they will be redirected to login.aspx?ReturnURL=%2f .

    0 讨论(0)
提交回复
热议问题