S
Stimp
sorry I have to repost this question since I can't find the
replies (if any) to a question I posted two days ago
(what's the post turn-around for this group btw, every 2 days
they delete all posts in cache or something?)
If a browser to my site enters:
http://www.website.com/user/123
I want this to automatically redirect to:
http://www.website.com/index.aspx?myuserid=123.
I know how to do this if you enter a URL like:
http://www.website.com/user/123.aspx (i.e. with a file extension)
and then in the global.asax BeginRequest method you can redirect the URL
to http://www.website.com/index.aspx?myuserid=123 using:
strCustomPath = _
String.Format( _
"/index.aspx?myuserid={0}", _
Path.GetFileNameWithoutExtension( Request.Path ) )
Context.RewritePath( strCustomPath )
Any idea how to do it without having to add a .aspx to the end of URL?
Cheers!
replies (if any) to a question I posted two days ago
(what's the post turn-around for this group btw, every 2 days
they delete all posts in cache or something?)
If a browser to my site enters:
http://www.website.com/user/123
I want this to automatically redirect to:
http://www.website.com/index.aspx?myuserid=123.
I know how to do this if you enter a URL like:
http://www.website.com/user/123.aspx (i.e. with a file extension)
and then in the global.asax BeginRequest method you can redirect the URL
to http://www.website.com/index.aspx?myuserid=123 using:
strCustomPath = _
String.Format( _
"/index.aspx?myuserid={0}", _
Path.GetFileNameWithoutExtension( Request.Path ) )
Context.RewritePath( strCustomPath )
Any idea how to do it without having to add a .aspx to the end of URL?
Cheers!