View Single Post
Old 06-29-2007, 01:36 PM   · #1
Daniel
Danltn.com
 
Daniel's Avatar
 
Name: Daniel Neville
Location: Danltn.com / Nottingham, UK
Trader Rating: (65)
Join Date: May 2007
Posts: 1,185
NP$: 0.56 (Donate)
Daniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond repute
Ethan Allen Fund Ethan Allen Fund
Only got Parked Domains? Try This!

If you only have parked domains, or you have a limited amount of addon domains. This script maybe to your liking.

Put this script at the top of your /www/index.php file.

PHP Code:
<?php
function curPageURL() {
$pageURL = 'http';
if (
$_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if (
$_SERVER["SERVER_PORT"] != "80") {
  
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
  
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
return
$pageURL;
}
$x = curPageURL(); //Allows for editing via End User
if ($x=="http://domain.tld/")
header('Location: http://domain.com/subdomain/');


if (
$x=="http://domain.tld/") //Enter the parked page here // add as many you like
header('Location: http://domain.com/subdomain/'); //Enter the redirect location here

?>


It gets the current page, and then compares it to the supplied domains, if the supplied domain is the same as the current. (I.E. If I used http://footyleague.info parked on is-hot.net, then it would detect I accessed from footyleague.info and automatically forward me to the relevant page.)

It's a simple script, so use it how you like.


Please register or log-in into NamePros to hide ads
Daniel is offline   Reply With Quote
Site Sponsors
Traffic Down Under Buy Flash Arcade Game Script Proof is in the Parking
Advertise your business at NamePros
All times are GMT -7. The time now is 12:15 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.