Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

how can i provide a domain name to other users

Posted on 2002-06-24
5
Medium Priority
?
214 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
The purpose of this video is to demonstrate how to connect a WordPress website to Google Analytics. 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 :…
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…
Suggested Courses

636 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