Hi All,
I will be creating a white label website for car hire dealers. My main website will be called something like: carhireDOTcom, the content on carhireDOTcom will be pulled in from a database.
Now once that carhire.com is complete i want to be able to frame forward other domains e.g. phillscarsDOTcom, so what will happen is someone will go to phillscarsDOTcom and the content wil be loaded from carhireDOTcom (the content loaded will be relevant to phillscarsDOTcom).
There are going to be several domain names frame forwarding to carhire.com, each domain name needs to be read by carhireDOTcom and serve the correct content based on the domain name. Also when someone goes to phillscarsDOTcom each link on the website needs to point to phillscarsDOTcom/thelink.php
I am not sure how to achieve the above, if someone could point me in the correct direction or post sample code that would be most helpful.
thanks
rg
Frame forwarding, show different content based on domain name
Started by x232, Sep 09 2008 12:22 PM
2 replies to this topic
#1
Posted 09 September 2008 - 12:22 PM
|
|
|
#2
Posted 09 September 2008 - 12:42 PM
Easiest thing is either to change the web servers forwarding for those domains, or in the index.php check which site is surfed in to by checking
Make sure this command is ran before any output is made.
$_SERVER['HTTP_HOST']variable, which contains the address the user originally surfed to, and then forward to the right address with
header('Location: http://www.example.com/');
Make sure this command is ran before any output is made.
#3
Posted 18 September 2008 - 01:09 PM
Another possibility would be to use this:
<meta http-equiv="refresh" content="0; URL=yourfile.php">


Sign In
Create Account

Back to top









