Membership is FREE, giving all registered users unlimited access to every Acorn Domains feature, resource, and tool! Optional membership upgrades unlock exclusive benefits like profile signatures with links, banner placements, appearances in the weekly newsletter, and much more - customized to your membership level!

Little help

Status
Not open for further replies.
Joined
Feb 12, 2006
Posts
629
Reaction score
12
Hi guys,

i posted a month ago regarding DNS and who to direct all domain names to one page, sorted that thanks to a few on here.

Next question is as i am having 1 generic page is there anyway for me to list the domain name they have been diverted from on the page?

ie, The domain name (domainname.co.uk) may be for sale. Red static text, domainname.co.uk the dynamic bit.

Any help would be great.
 
I don't know if this is the best way of doing things, but one way to get it to work is to create a php holding page that redirects to another page on your generic website. There a session will be set and then further redirected to the landing page.

EDIT: This code required manual intervention. Below I've produced a script that is completely automated.
 
Last edited:
Wow, thanks for that Alex, rep added for this post!

Does this show where you have come from? I have forwarded 01925.co.uk and just get "The domain name your domain here may be for sale"

Have i done something wrong :)

What i am looking for is something that knows where i have come from originally, like the domain name 01925.co.uk is for sale without me typing 01925? dont know if it can be done as i am shit with this stuff lol.
 
Last edited:
No problem, glad to help. Thanks for the rep.

EDIT: the code requires some manual intervention. I'll make you an automated script now and PM it to you.
 
Last edited:
PM sent with automated script that shows the original domain without you having to manually intervene other than pointing the domain to the file. Let me know if you have any problems.

Alex

Just tested, works perfectly :)
 
Last edited:
For my domains I simply have a single page which I park all names ontop of. There is some basic PHP code which dispays the domain which has been typed in by the user (in the format "domain.co.uk") and works perfectly, if you still need this feel free to PM me and I'll let you know what to do :)
 
For my domains I simply have a single page which I park all names ontop of. There is some basic PHP code which dispays the domain which has been typed in by the user (in the format "domain.co.uk") and works perfectly, if you still need this feel free to PM me and I'll let you know what to do :)
I am looking to do the same thing at some point. Any chance you could post or pm me? Cheers :)
 
My landing page, e.g. tqt.co.uk uses this:

PHP:
Looking for the domain <strong><?php echo htmlentities($_SERVER['HTTP_HOST']);?></strong>?
 
My landing page, e.g. tqt.co.uk uses this:

PHP:
Looking for the domain <strong><?php echo htmlentities($_SERVER['HTTP_HOST']);?></strong>?

This discovers the domain, but doesn't store the information and forward to a seperate domain.


This is the script I produced. It works fine, but wb's may be better.

This will automate everything, all you have to do is set the first index file as the home page for all the forwarding domains. Stages 2 and 3 willl need to go in a seperate directory.

1) create a directory on the server and name the following code ‘index.php’, then set this as the home page for any domain you want forwarding.

PHP:
<?php
$url = $_SERVER['HTTP_HOST'];
header("location: http://www.[your generic domain].co.uk/receive.php?d=$url"); 
die(); 
?>

2) In a seperate directory, for the generic domain, name the following ‘receive.php’.

PHP:
<?php 
session_start(); 
$domain = $_GET['d']; 
$_SESSION['domain']=$domain; 
header("location: http://www.[your generic domain].co.uk/"); 
die(); 
?>

3) In the same directory name the following ‘index.php’.

PHP:
<?php 
session_start(); 
$domain = $_SESSION['domain']; 
session_destroy(); 
echo "<p style='color:F00'>The domain name $domain may be for sale</p>"; 
?>

NB: you will need to replace any [your generic domain] with the actual generic domain in the ‘index.php’ and ‘receive.php’ files.

This works with no problems, but seeing other posts in the thread others may be more experienced than me and can produce the same effect with minimal code.

Just to clarify, the above script displays with or without the 'www.' depending on whether or not it is typed in by the visitor when visiting the site. If you need it to always include/exclude the 'www.' then let me know and I'll update it.
 
Last edited:
Alex's reply seems best for this post if you wish to forward to another domain :cool:

If however like my domains you want to have a parking page which can get indexed, use the following code wherever you want the URL to be displayed (this code automatically leaves out the "www." whether it is entered or not).

PHP:
<?php $hostname = $_SERVER['SERVER_NAME']; $hostname = str_replace('www.', '', $hostname); echo $hostname; ?>

E.g. "The domain name [code above here] may be for sale."

You only need to set this code up on one domain (I suggest using something like "parked.your-business-website.co.uk"), then simply park all your names for sale ontop of it. Feel free to add rep if this has helped :)
 
http://www.acorndomains.co.uk/general-board/45790-parking-vs-sale-landing-page-vs.html

I posted the bulk of my parking script above Page 2+3, which includes some basic mysql logging and other stuff.

I'm using it on http://www.24i.co.uk/ to sell, and http://www.ephedrina.co.uk/ for affiliates. Both are the same script.

I keep meaning to finish the script off but it does increase sales.

It stores Stats
IP: 86.144.229.9
Domain: pornservers.co.uk
Referer: http://www.acorndomains.co.uk/general-domain-parki...
Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv...
Time: 2009-01-16 15:01:40

So you can see whats working.
 
Status
Not open for further replies.

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Members online

Premium Members

Latest Comments

New Threads

Domain Forum Friends

Our Mods' Businesses

*the exceptional businesses of our esteemed moderators
General chit-chat
Help Users
  • No one is chatting at the moment.
      There are no messages in the current room.
      Top Bottom