mapping hostname.com/username to a page

G

Guest

That's gonna be messy with IIS6. In IIS7 it's a piece of cake as for IIS6 i'd
suggest using this URL scheme:

thehost.com/johndoe.aspx - when using .aspx at the end you're able to dig
into it via (e.g.) global.asax in ASP.NET. If you want to use dynamic
folders, you'd have to missuse 404 Pages to make this work with IIS6, it's
not worth the effort.

Excellent post on URL Rewriting:
http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx
 
D

densial

That's gonna be messy with IIS6. In IIS7 it's a piece of cake as for IIS6 i'd
suggest using this URL scheme:

thehost.com/johndoe.aspx - when using .aspx at the end you're able to dig
into it via (e.g.) global.asax in ASP.NET. If you want to use dynamic
folders, you'd have to missuse 404 Pages to make this work with IIS6, it's
not worth the effort.

Excellent post on URL Rewriting:http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewri...

put some code into the Application_Error of your global.asax,
something like

Dim httpEx As HttpException = CType(ex, HttpException)
Dim httpCode As Integer = httpEx.GetHttpCode()
If httpCode = 404 Then
'go look up the URL and do a redirect to the appropriate page
End If
 
N

Nick Chan

another way is to add the http 404 handler in web.config, and in the
processing page, u get URL Referrer.
URL Referrer doesn't work in some ways, but in my experience, with
hostname.com/username, it works everytime
 
J

John Mott

Thanks! I'm guessing that you have to use either relative paths (./) or
complete (http://) paths for images, stylesheets etc.?

john
 

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,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top