Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

subdomain help

by bravenmd (Sexton)
on Jun 15, 2005 at 19:30 UTC ( [id://467029]=perlquestion: print w/replies, xml ) Need Help??

bravenmd has asked for the wisdom of the Perl Monks concerning the following question:

I am currenlty working with a system containing 3 separate subdomains all accessing the same perl code base but each subdomain using a different set of graphics to create a different look and feel. I was wondering if anyone could provide any wisdom on how to go about accessing this different set of graphics based on the subdomain being used?

Replies are listed 'Best First'.
Re: subdomain help
by ikegami (Patriarch) on Jun 15, 2005 at 20:21 UTC
    If your script outputs <img src="/images/logo.png">, that would result in a different absolute URL for every domain. If all that's different is the images, you don't need to do anything special in your Perl program.
Re: subdomain help
by kyoshu (Curate) on Jun 16, 2005 at 06:41 UTC
    if you run for example apache, it supports VirtualHost, so you can make few different pages, or try checking $ENV{HTTP_HOST}, just like ercparker suggested.
Re: subdomain help
by ercparker (Hermit) on Jun 16, 2005 at 05:49 UTC
    can you check the environment variable $ENV{HTTP_HOST} to see which sub domain the user is using
    example: sub.somedomain.com
    based on that display the appropriate image.
    I hope I understood your problem

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://467029]
Approved by Errto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-20 06:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found