?
Solved

how can i provide a domain name to other users

Posted on 2002-06-24
5
Medium Priority
?
205 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 800 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

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…
This guide will walk you through the essential considerations and tech stack for building scalable websites. Know how to grow your business the smart way!
The purpose of this video is to demonstrate how to integrate Mailchimp with Facebook. This will be demonstrated using a Windows 8 PC. Mailchimp and Facebook will be used. Log into your Mailchimp account. : Click on your name. Go to Account Setti…
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. 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 : Go t…

762 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