Identifying the web site address of the current page

R

Roger Withnell

I have several web sites running the same set of pages and
all accessing the same common database tables. A field in
all the records contains the web site address of the web
site to which each record pertains, for example, this
field in some records may contain www.upperbridge.co.uk.
When a web site page accesses a database table, it needs
to select the records that contain its web site address.
How do I identify which web site this page is in? For
example, if a page is part of web site
www.upperbridge.co.uk, how does the page get hold of this
web site address so it can use it to select the correct
records in the common database tables?
 
B

Bob Barrows

Roger said:
I have several web sites running the same set of pages and
all accessing the same common database tables. A field in
all the records contains the web site address of the web
site to which each record pertains, for example, this
field in some records may contain www.upperbridge.co.uk.
When a web site page accesses a database table, it needs
to select the records that contain its web site address.
How do I identify which web site this page is in? For
example, if a page is part of web site
www.upperbridge.co.uk, how does the page get hold of this
web site address so it can use it to select the correct
records in the common database tables?

A servervariable should contain this info. I don't feel like going to look
up which one at the moment, but you can generate all the servervariables
like this:

for each item in request.servervariables
response.write item & ": "
response.write request.servervariables(item) & "<BR>"
next

HTH,
Bob Barrows
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top