Global.Asa and more

  • Thread starter Stan Sainte-Rose
  • Start date
S

Stan Sainte-Rose

Hi,

I need some help on this topic.

I have a generic website where I would like to point different domain names
as well as virtual directories.


Right now, I create for each domain name a directory, I store a copy of the
generic website
and I set a value to a variable into my global.asa called
Application("IDSITE")= xxx
With this variable, I know which datas I have to use with my Database.

Using this system, that means If I make updates or add new asp pages
I have to copy them into each directory.

So my question is, how to avoid this..
Is there a way within IIS to add a value (which will be the IDSITE) for each
domain name or virtual directories ?
The goal would be to create a directory for each domain names where I will
just put a global.asa and use a generic directory (where the generic
website will be stored)

Or is it possible to use conditions within the global.asa.
Something like this :
Select Case DomainName
Case "firstdomainename.com"
Application("IDSITE")=1
Case "seconddomainename.com"
Application("IDSITE")=2
Case "thirddomainename.com"
Application("IDSITE")=3
End Select
But in this case how to know which domain name and "VIRTUAL DIRECTORY" was
called
For the domain name, I think I can use the Server variable "Server_name" or
"http_host"
but for the virtual directory I don't know how to control it.

Any help ?

Stan
 
I

io

You don't need to maintain multiple directories. As soon as your domain
names mapped to same physical server, that is, IP address you can handle it
quite easy. This is, in fact, a classical badging scenario. Global.asa is
not the place for what you're trying to achieve. The better candidate would
be default.asp
 

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

Similar Threads

Global.asa 5
React+Formik+Yup - validate in order 1
Global.asa 0
Global.asa 1
global.asa in subdirectory 4
ENABLESESSIONSTATE and Global.asa 4
Global.asa 19
global.asa 1

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top