View Full Version : URL Extensions?
09-12-2005, 06:48 PM
I am writing an ASP/database driven site and I need to be able to have subdomains in my code based on certain member information. For instance if my membership name for the site is "James" then I would need the URL as follows:
And I would need the above URL to point to an asp page...
Does anyone know how I can accomplish this?
Thanks in advance,
09-12-2005, 07:08 PM
Well, if you have an html page that asks for a member name with an input named MemberName and submits to the below ASP page (MemberRedirect.asp), you could do something like:
<% ' MemberRedirect.asp %>
<%@ Language = "VBScript" %>
Reponse.Buffer = True
Dim member, redirectPage
' Grabs the member's name from previous page and trims any leading or trailing white space
member = Trim(Request.Form("MemberName"))
'Redirect to member's subdomain
redirectPage = "www.mywebsite.com/" & MemberName & ".asp"
09-14-2005, 03:43 AM
Technically that's not considered a subdomain, but this is:
And actually www.mywebsite.com/James DOES already point to a page and that page is this:
And several Web hosts such as Gearhost.com and Best-Machine.com allow one to set up multiple Web sites on one account. Thus you could have:
And you could make it so that http://www.myothersite.com points to the http://www.mysite.com/myothersite folder.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.