N
news.microsoft.com
I've got a web site with URLs like the following:
http://www.mysite.com/nnnn/webpage.aspx
where nnnn is a number which represents an ID, e.g.
http://www.mysite.com/1234/webpage.aspx.
I can easily decode the URL and retrieve the ID (which represents a specific
customer) and then rewrite the URL, removing the ID so that the page served
for the above example would be http://www.mysite.com/webpage.aspx. This
scheme makes it look like each customer has their own "directory" on the web
site, where it's actually one directory but parameterised by their ID.
The problem is that Forms Authentication seems to require a hard-coded login
page in the web.config file. But I need to be able to specify the login page
at runtime. So, for the above example, if the user isn't authenticated,
Forms Authentication should redirect to
http://www.mysite.com/1234/login.aspx, but if the ID were 9999 it should be
http://www.mysite.com/9999/login.aspx.
What's the easiest way to achieve this?
TIA
MikeS.
http://www.mysite.com/nnnn/webpage.aspx
where nnnn is a number which represents an ID, e.g.
http://www.mysite.com/1234/webpage.aspx.
I can easily decode the URL and retrieve the ID (which represents a specific
customer) and then rewrite the URL, removing the ID so that the page served
for the above example would be http://www.mysite.com/webpage.aspx. This
scheme makes it look like each customer has their own "directory" on the web
site, where it's actually one directory but parameterised by their ID.
The problem is that Forms Authentication seems to require a hard-coded login
page in the web.config file. But I need to be able to specify the login page
at runtime. So, for the above example, if the user isn't authenticated,
Forms Authentication should redirect to
http://www.mysite.com/1234/login.aspx, but if the ID were 9999 it should be
http://www.mysite.com/9999/login.aspx.
What's the easiest way to achieve this?
TIA
MikeS.