Resolve URL

R

RSS

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
 
R

RSS

I hear you. If it only was so easy. The idea here is that each user would
have their own "space" and they dont have to memorize the long URL.

Thanks for suggestion.
 
B

Ben Rush

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:

www.server.com/myapplication/filename.dir/folderA
www.server.com/myapplication/filename.dir/folderB
......
www.server.com/myapplication/filename.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.
 
C

clintonG

I've developed several secure 'dealership' -- 'membership' type of sites
that had the exact same requirements so this is somewhat 'old hat' to me.
Before I waste my time describing the methodologies I've used which may not
be pertinent or useful I have to ask how secure the client wants their site
to be?

Does the client want users to securely login or simply make it easy for
dimwits to request and access pages that are in the public domain anyway?

As an aside, ASP.NET 2.0 (RTM November 7th) supports Profiles, Membership
and Roles this type of project begs for.


<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top