Solved

how can i provide a domain name to other users

Posted on 2002-06-24
5
171 Views
Last Modified: 2010-04-07
i am developing a web site that allows other to create their domain name like www.myname.com where my name is the username?
0
Comment
Question by:efkamel
  • 2
  • 2
5 Comments
 
LVL 2

Expert Comment

by:ManuelMSP
ID: 7110047
Which scripting language you use?

Here's a ASP solution:
Normally, domains can only be set-up so that they point to the root directory of your web site.  However, using ASP code, you can detect which URL a person is browsing to your site with, and redirect them to the appropriate place on your site.    The below code will work well.  Just name the files Default.asp and database, and place them in the <root> of your site:

Filename: Default.asp
<%
sname = Request.ServerVariables("Server_name")
sname = ucase(sname)
fPath = "database"
set fobj=server.CreateObject("scripting.filesystemobject")
fname=Server.MapPath(fpath)
Set f = fobj.GetFile(fname)
set fin=f.OpenAsTextStream (1, -2)
MyLine = ucase(fin.ReadAll)
TestLine = sname & "|"
testPos = InStr(MyLine, TestLine)
if testPos <> 0 then
SecondPipe = InStr((testPos + Len(TestLine)), MyLine, "|")
PosMatchEnd = (testPos + len(TestLine))
PosSecondEnd = SecondPipe - PosMatchEnd
RedirURL = mid(MyLine, PosMatchEnd, PosSecondEnd)
response.redirect lcase(RedirURL)
else
response.redirect "Default.htm"
end if
fin.close
%>
<html><head><title></title></head><body></body></html>

Filename: database
yourdomain.com|http://www.yourdomain.com/|
subdomain.com|http://www.yourdomain.com/subdomain/|
www.subdomain.com|http://www.yourdomain.com/subdomain/|

(The separators in this example are | 'pipe' symbols)
0
 
LVL 2

Accepted Solution

by:
ManuelMSP earned 200 total points
ID: 7110265
Try this:

Set root = GetObject("IIS://localhost/W3SVC/1/Root")
Set newVDir = root.Create("IIsWebVirtualDir","ADSIExamples")
newVDir.Path = "e:\iis3\server2\ADSI"
newVDir.EnableDirBrowsing = True
newVDir.AccessScript = True
newVDir.AccessRead = False
newVDir.SetInfo

More info at:
http://www.alphasierrapapa.com/IisDev/Articles/ADSI/
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 8148418
This question has been abandoned. I will make a recommendation to the
moderators on its resolution in a week or two. I appreciate any comments
that would help me to make a recommendation.
<note>
   In the absence of responses, I may recommend DELETE unless it is clear
   to me that it has value as a PAQ.  Silence = you don't care
</note>

Cd&
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 8187139
It is time to clean this abandoned question up.  

I am putting it on a clean up list for CS.

<recommendation>
points to ManuelMSP

</recommendation>

If anyone participating in the Q disagrees with the recommendation,
please leave a comment for the mods.

Cd&
0
 

Expert Comment

by:Chmod
ID: 8240366
As recommended

Chmod
Community Support Moderator @Experts Exchange
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ColdFusion and quickBooks 4 75
Drawing complex html tables in wysiwyg editor 8 131
Resizing code128 barcode using cold fusion 14 164
Ecommerce options and opinions... 6 64
In this short web based tutorial, I wanted to show users how they can still use the powers of FrontPage in conjunction with Expression Web 3.  Even though Microsoft eliminated the use of Web components, we can still use them with FrontPage and edit …
When setting up new project requests for our site, one of the most powerful tools our team has available to use is Axure (http://www.axure.com/). It’s a tool for creating software and web prototypes that can function and interact as if it were the a…
The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question