Hello, I would like to send everyone to the only page in my application regardless of what they type in. therefore: localhost/Myfolder/page1.aspx localhost/Myfolder/page3.aspx localhost/NewFolder/Test3/goblygoo.aspx localhost/NewFolder/test/test33/goo.html
will go to: localhost/default.aspx I don't care about rewriting URLs. All visitors need to go to one page but have the ability to type in strings after the URL. I tried just using Server.Transfer in global.asax.vb section Application_BeginRequest but that
didn't work. Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs) '-- Send all application requests to default.aspx Server.Transfer("default.aspx") End Sub
I would also like to strip of any file extensions therefore if they type localhost/mypage.htm localhost/folder1/mypage.asdf still goes to localhost/default.aspx TIA, Mike
If an answer has been provided to you question please mark it as an answer.
You can create HttpHandler to serve all request comming to your site. and then set up web.config file as shown below. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWebIHttpHandlerFactoryClassGetHandlerTopic.asp
Jigar Desai -----------------------
Do not forget to "Mark as Answer" on the post that helped you.
Member
501 Points
478 Posts
Send everyone to one page
Sep 27, 2004 10:33 AM|Mlogan|LINK
Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs) '-- Send all application requests to default.aspx Server.Transfer("default.aspx") End Sub
I would also like to strip of any file extensions therefore if they type localhost/mypage.htm localhost/folder1/mypage.asdf still goes to localhost/default.aspx TIA, MikeMember
191 Points
935 Posts
Re: Send everyone to one page
Sep 27, 2004 03:04 PM|Jigar|LINK
-----------------------
Do not forget to "Mark as Answer" on the post that helped you.