|
Posted by flowover on 01/05/08 13:04
On Jan 5, 3:04 am, Jason Carlton <jwcarl...@gmail.com> wrote:
> I have several domains parked over my primary domain, and based on
> which domain is typed in the content changes slightly for each page
> (title bar, keywords, little things like that). But, I'm having a few
> minor issues.
>
> Every page calls a variables.php (where all of the variables are set
> at once), which goes like:
>
> //www.parkdomain1.com
> if (strpos($_SERVER['HTTP_HOST'], "parkdomain1")) {
> // set variables
>
> }
>
> //www.parkdomain2.com
> else if (strpos($_SERVER['HTTP_HOST'], "parkdomain2")) {
> // set variables
>
> }
>
> //www.actualdomain.com
> else {
> // set variables
>
> }
>
> My question is, is this the best way to find which domain has been
> entered? Also, considering that I'm always battling speed issues on my
> site, is there a faster option than $_SERVER['HTTP_HOST']?
>
> TIA,
>
> Jason
You could always try mod_rewrite if you have Apache. It's fairly
robust. http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html
Navigation:
[Reply to this message]
|