[advanced search]
Results from the most recent live auction are here.
27 members in the live chat room. Join Chat!
Register Rules & FAQ NP$ Store Active Threads Mark Forums Read
Go Back   NamePros.Com > Design and Development > Programming > CODE
User Name
Password

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$: 681.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
Old 06-30-2007, 02:29 AM   · #2
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$: 681.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
Update, this allows the user to load a different page. For example Domain.com would load domaincom.php homepage.

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://recentfootynews.info/") // Enter the parked domain
header('Location: http://domain.com/subdomain/'); //Enter the page you want to redirect to if using forwarder otherwise // it.
include 'simple.php'; //if you want different content instead of normal then include it, otherwise // it. (This will load simple.php, which can be a fully-fledged php/html page.)
exit; //This stops the rest from loading

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
  
?>

Last edited by Danltn : 06-30-2007 at 07:37 AM.
Daniel is offline   Reply With Quote
Closed Thread

NamePros is a revenue sharing forum.

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


Site Sponsors
Thousand Dollar Profits Thousand Dollar Profits http://www.mobisitetrader.com/
Advertise your business at NamePros
All times are GMT -7. The time now is 02:43 PM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0