Page 1 of 1
Image based on URL: POSSIBLE?
Posted: Mon Jun 14, 2004 1:56 pm
by mhulse
Hi,
I have ~six domain names that all point to the same server... For example:
Code: Select all
http://www.domain1.com ---\
http://www.domain2.com |
http://www.domain3.com |
http://www.domain4.com |---> forwarded to --> http://gladstone.uoregon.edu/~myusernam ... /index.php
http://www.domain5.com |
http://www.domain6.com |
http://www.domain7.com ---/
Based on the above setup, is it possible to have a specific (banner) image displayed depending on the domain that the user typed in?
For example, lets say the user types in
http://www.domain2.com, they would then see a bitmap banner that displays "domain2.com".
Maybe Javascript would be better for this...
Anyway, any suggestions would be cool!
Thanks in advance! Cheers!
<m />
Posted: Mon Jun 14, 2004 2:00 pm
by Weirdan
what does:
Code: Select all
echo "<pre>"; print_r($_SERVER); echo "</pre>";
show?
Posted: Mon Jun 14, 2004 2:01 pm
by launchcode
How do the domains work? For example when someone enters the URL domain1.com does their browser get redirected and eventually show the uoregon.edu address in the browser, or not?
Depending on this depends if it is easily possible or not.
Posted: Mon Jun 14, 2004 2:23 pm
by mhulse
Weirdan wrote:what does:
Code: Select all
echo "<pre>"; print_r($_SERVER); echo "</pre>";
show?
I will try that, I figured may be as simple as that... sorry, I am a noob...
How do the domains work? For example when someone enters the URL domain1.com does their browser get redirected and eventually show the uoregon.edu address in the browser, or not?
Yes, they all eventually show the uoregon address...
I could pay to have my domains masked, then they are just put within a main frame that always displays
http://www.somedomain.com... even if you have navigated to sub-sub-pages... maybe it would work then...
Thanks for your help!

Posted: Mon Jun 14, 2004 3:04 pm
by mhulse
Weirdan wrote:what does:
Code: Select all
echo "<pre>"; print_r($_SERVER); echo "</pre>";
show?
Code: Select all
Array
(
їPATH] => /usr/local/bin:/usr/bin:/bin
їTZ] => US/Pacific
їHTTP_HOST] => gladstone.uoregon.edu
їHTTP_CONNECTION] => keep-alive
їHTTP_USER_AGENT] => Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/124 (KHTML, like Gecko) Safari/125
їHTTP_ACCEPT] => */*
їHTTP_ACCEPT_ENCODING] => gzip, deflate;q=1.0, identity;q=0.5, *;q=0
їHTTP_ACCEPT_LANGUAGE] => en, ja;q=0.92, ja-jp;q=0.96, fr;q=0.88, de-de;q=0.85, de;q=0.81, es;q=0.77, it-it;q=0.73, it;q=0.69, nl-nl;q=0.65, nl;q=0.62, sv-se;q=0.58, sv;q=0.54, no-no;q=0.50, no;q=0.46, da-dk;q=0.42, da;q=0.38, fi-fi;q=0.35, fi;q=0.31
їHTTP_COOKIE] => PHPSESSID=5073791297752f6e59848c9bbabb74c7
їSERVER_SOFTWARE] => Apache/2.0.49 (Unix)
їSERVER_NAME] => gladstone.uoregon.edu
їSERVER_ADDR] => 128.223.142.14
їSERVER_PORT] => 80
їREMOTE_ADDR] => 128.223.210.40
їDOCUMENT_ROOT] => /var/www/htdocs
їSERVER_ADMIN] => webmaster@darkwing.uoregon.edu
їSCRIPT_FILENAME] => /home1/myusername/public_html/www/index.php
їREMOTE_PORT] => 52009
їGATEWAY_INTERFACE] => CGI/1.1
їSERVER_PROTOCOL] => HTTP/1.1
їREQUEST_METHOD] => GET
їQUERY_STRING] =>
їREQUEST_URI] => /~myusername/www//
їSCRIPT_NAME] => /~ myusername/www//index.php
їPHP_SELF] => /~ myusername/www//index.php
їargv] => Array
(
)
їargc] => 0
)
It looks like I will have to set up domain masking with my DNS provider.
Thanks!
Cheers
<M />