If it absolutely must be in the format of
www.server.com/folder
Then I would suggest looking up IIS ISAPI filters, as this will give you the
power to intrude on the traffic pipeline of IIS and alter data as it comes
in, and how (and, also redirect). They can be installed and registered on
the machine. I have written extensions before, never filters, and you're
probably in the wrong newsgroup to pursue any more questions about them.
There are other tricks, however, if you wish to do stuff in asp.net.
Something I figured out a while ago was that you may have '/' as a piece of
your querystring. That, in conjunction with HttpModules inserted into the
ASP.Net pipeline (and the registration of a handler for a new file-extension
type) can make URLs like the following a reality:
http://www.server.com/myapplication/...me.dir/folderA http://www.server.com/myapplication/...me.dir/folderB
......
http://www.server.com/myapplication/...me.dir/folderN
Your myapplication is an ASP.Net web application and, as such, the ASP.Net
pipeline will load HttpModules for you - and you'll simply register an
HttpModule to respond to the request for the '.dir' extesion (or whatever
you choose). The forward slash '/' character becomes part of your overall
querystring (it either shows up in the querystring or you can grab it in its
entirity in the Request object - the exact answer eludes me) as '/folderN'
which you can then cause to redirect, respond accordingly, etc. For example
browse to this address:
http://www.microsoft.com/default.aspx/blah/blah, it
resolves to
www.microsoft.com.
--
Ben Rush
http://www.ben-rush.net/blog/ http://www.littlebigendian.com/
"RSS" <RS*@RSS.COM> wrote in message
news:uJ*************@TK2MSFTNGP10.phx.gbl...
Hello everyone.
I am looking for a solution to following problem. If any one is able to
help I want to say thank you very much ahead of time.
My client has a website. For each user they want to have "separate" url in
following fashion --> www.site.com/username
Now, having it in such fashion means to have a "folder" for each user and
they don't want that. Instead they want to be able to parse the url and do
things based on username.
When request comes in and that "folder" not there I get "You not
authorized to view this page" and so on. Now is there a way to be able to
pick up that URL and parse it somehow and redirect browser to a different
page. They have very limited access to the IIS because the host this stuff
off site and I cant physically change the 404 redirect in the IIS, plus I
don't want to write an app that will depend on errors to process logic. I
hope i explained it well. If not, then please write back!!! Ill try to
clarify.
Please help!
Thank you much,
RSS