MarkCC
10-16-2003, 04:22 AM
Currently we have a main website with a seperate webserver for a e-commerce business to business type thing.
We're currently planning to expand a bit to have company 1 and company 2.
While they are the same company we plan on the two providing different things, so for example we currently only have one website and the one e-commerce site running on an IIS machine onsite.
I've currently got a work in progress of having it using vhosts so when somebody visits subname.company1.com they get the e-commerce site with company 1 logo's and when they visit subname.company2.com they get the e-commerce site with company 2 logo's etc.
So, we would have two instances of it running the e-commerce site.. vhost for company 1 points to a directory with one copy of the e-commerce asp files etc modified to point to company 1 images and ditto for company 2.
However, it turns out this arises licensing issues.. before I joined the company this e-commerce site was bought and it appears we're only allowed to run one instance of it (I believe it cost in the range of £10k).
Therefore, since I don't want to be costing the company a large sum of money I want it so it still runs one instance, what I want to do is have all of the domains (subname.company1.com, co.uk and subname.company2.com, co.uk) point to the same directory but when somebody visits the site using say subname.company1.com they get the company 1 images and when somebody visits subname.company2.com they get the company 2 images.
So, I need it to somehow detect what the domain is and then set the img src to the appropriate image.. its only for a few images it might have to apply to some text too...
Since this is on a IIS webserver with ASP i can do it either client side or server side, it doesn't matter as long as at the user end it displays company 1 images and maybe some text.
Anyone know how?
So, its:
Detect what the domain name is.
Change img src tags to point to different images
Write different text (i.e. "Welcome to %companyname% e-commerce site" etc)
We're currently planning to expand a bit to have company 1 and company 2.
While they are the same company we plan on the two providing different things, so for example we currently only have one website and the one e-commerce site running on an IIS machine onsite.
I've currently got a work in progress of having it using vhosts so when somebody visits subname.company1.com they get the e-commerce site with company 1 logo's and when they visit subname.company2.com they get the e-commerce site with company 2 logo's etc.
So, we would have two instances of it running the e-commerce site.. vhost for company 1 points to a directory with one copy of the e-commerce asp files etc modified to point to company 1 images and ditto for company 2.
However, it turns out this arises licensing issues.. before I joined the company this e-commerce site was bought and it appears we're only allowed to run one instance of it (I believe it cost in the range of £10k).
Therefore, since I don't want to be costing the company a large sum of money I want it so it still runs one instance, what I want to do is have all of the domains (subname.company1.com, co.uk and subname.company2.com, co.uk) point to the same directory but when somebody visits the site using say subname.company1.com they get the company 1 images and when somebody visits subname.company2.com they get the company 2 images.
So, I need it to somehow detect what the domain is and then set the img src to the appropriate image.. its only for a few images it might have to apply to some text too...
Since this is on a IIS webserver with ASP i can do it either client side or server side, it doesn't matter as long as at the user end it displays company 1 images and maybe some text.
Anyone know how?
So, its:
Detect what the domain name is.
Change img src tags to point to different images
Write different text (i.e. "Welcome to %companyname% e-commerce site" etc)