473,503 Members | 1,683 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Extracting the domain name

I'm using one set of database tables to serve many
different domains, using the domain name to identify the
records related to a particular domain.

How do I use ASP to extract the domain name for the page
I'm in so that I can search the database for the
appropriate records?
Jul 19 '05 #1
2 1891
What do you mean? You have one site in IIS that is serving multiple WWW
domains, or are you talking about NT domains? Can you re-explain this
please?

Ray at home

"Roger Withnell" <ro***@upperbridge.co.uk> wrote in message
news:06****************************@phx.gbl...
I'm using one set of database tables to serve many
different domains, using the domain name to identify the
records related to a particular domain.

How do I use ASP to extract the domain name for the page
I'm in so that I can search the database for the
appropriate records?

Jul 19 '05 #2
Ray at <%=sLocation%> wrote on 04 okt 2003 in
microsoft.public.inetserver.asp.general:
What do you mean? You have one site in IIS that is serving multiple
WWW domains, or are you talking about NT domains? Can you re-explain
this please?


Why not?

You can register many domains and ns-point them to the same IP, having
ASP server.transfer them to a different set of pages.

"<!--#include virtual" this in the top of all your pages

===================

<%
host = Request.ServerVariables("HTTP_HOST")
url = Request.ServerVariables("URL")
if instr(url,"/mydomain")<>1 then
If instr(host,"mydomain.org") = 1 Then
server.transfer "/mydomainORG" & url
ElseIf instr(host,"mydomain.com") = 1 Then
server.transfer "/mydomainCOM" & url
ElseIf instr(host,"mydomain.nl") = 1 Then
server.transfer "/mydomainNL" & url
ElseIf instr(host,"123.123.123.123") = 1 Then
server.transfer "/mydomainIP" & url
End If
server.transfer "/404.asp"
end if
%>

===================

not tested !!!
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4013
by: Laz | last post by:
Hi, I've not worked with javascript, and after searching could not find example of this type of manipulation. I'm trying to set a variable to the last portion of a domain name. for example,...
5
1771
by: Michael Powe | last post by:
Hello, I wish to extract some text from certain elements on the page and process them. I've done this in the past by keying on the className but I don't have that option in this case. Below is...
0
1379
by: dmbkiwi | last post by:
I am trying to extract the value of a cookie from a CookieJar() object using cookielib. I have a CookieJar() object called cj. Printing cj gives: <_LWPCookieJar.LWPCookieJar> But i can't...
14
3727
by: Adnan Siddiqi | last post by:
Hi Suppose I have following URLs comming from an HTML document <a href="http://mydomain1.com">Domain1</a> <a...
1
1913
by: jerryyang_la1 | last post by:
I'm reading in a CSV and displaying using the code below: $users = file("text.txt"); echo "<table border='1' width='75%' align='center'>"; echo "<tr>"; echo "<td width='33%'...
3
1910
by: lazy | last post by:
Hi, Im trying to extract the domain name from an url. lets say I call it full_domain and significant_domain(which is the homepage domain) Eg: url=http://en.wikipedia.org/wiki/IPod ,...
1
1665
by: prashanth23in | last post by:
This is my first page <form name="form1" method="post" action="ins_comp.php" onsubmit="return form_chk();"> this is next page where i'm printing the posted values
6
4427
by: Werner | last post by:
Hi, I try to read (and extract) some "self extracting" zipefiles on a Windows system. The standard module zipefile seems not to be able to handle this. False Is there a wrapper or has...
4
8636
by: Ant | last post by:
Hi all, My kids have a bunch of games that have to be run from CD (on Windows XP). Now they're not very careful with them, and so I have a plan. I've downloaded a utility (Daemon Tools) which...
0
7201
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7083
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7328
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7456
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5011
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3166
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1510
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
734
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
379
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.