Solved

how can i provide a domain name to other users

Posted on 2002-06-24
5
164 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Turn A Profile Picture Into A Cartoon Using Photoshop And Illustrator This tutorial will teach you how to make a cartoon style image out of a regular picture. I have tried to keep the tutorial as simple as possible. I used Adobe CS4 for this tuto…
Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
The purpose of this video is to demonstrate how to insert an Iframe into WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Open Page or Post…
The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be IPage.com Log into your Hosting account. IPage will be used for demonstration : Locat…

706 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now