Enjoy unlimited access to all forum features for FREE! Optional upgrade available for extra perks.

parking script needed

Status
Not open for further replies.

Paullas

Staff member
Joined
Jul 13, 2004
Posts
5,790
Reaction score
334
i am after a parking script that is url dependant.

example:

i have domain.co.uk as the main sites and
domain1.co.uk
domain2.co.uk
domain3.co.uk parkked at domain.co.uk

what i want is a script on domain.co.uk so when someone types in domain1.co.uk the script at domain.co.uk will look at the url and display the page for domain1.co.uk and so on....

anyone any ideas on where i can find sucha script :)

i have a linux server and hosting is all sorted.

laskos
 
.

hi

i dont mind but i will have 500+ domains parked at one domain name(site) so the script will need to cope with directing each domain to the appropriate page

PHP preffered but i will look at other languages.

laskos
 
Well the way I would do it is- what ever domain is typed in it will go to your main domain where a script will look up a database file and search for a match of the referer url and if found will redirect to a specified page, i.e.

domain1.co.uk|loans.html
domain2.co.uk|cars.cgi
domain3.co.uk|house.php

etc

probably about 10 lines of code and a .db file with an entry for each domain that you own.

I've never tried php but if you prefer php then the script above should be easily found.
 
If you can use perl then hopefully this will do what you want:

-------------------------------------------------------------------------
#!/usr/bin/perl -wT

use strict;

my $url = $ENV{'HTTP_REFERER'};
my $main_page = "index.cgi";

open (DOMAINS_DB, "< domains.db");
my @JUMP = <DOMAINS_DB>;

# Loop through database file
foreach my $row (@JUMP) {
chomp($row);
my ($domain, $page) = split(/\|/, $row);

if ($domain eq $url) {
# If found jump to new landing page
print "Location: $page\n\n";
}
}

close (DOMAINS_DB);

exit(0);
-------------------------------------------------------------------------

Example of domains.db file


www.domain1.co.uk|loans.html
www.domain2.com|people.cgi
www.domain3.co.uk|money.php
etc
etc
 
Use .htaccess

For efficiency you might want to look into using .htaccess

In which you could obtain the refering domain using:
%{HTTP_referer}
If you have a separate .html file for each domain you could do something like:

Code:
RewriteEngine On
RewriteCond %{HTTP_REFERER} ^http:[^.]+.([^.]+).co.uk/ 
RewriteRule /* http://www.domain.com/$1.html

Or depending on what you're doing something like:

Code:
RewriteEngine On
RewriteCond %{HTTP_REFERER} ^http:[^.]+.([^.]+).co.uk/ 
RewriteRule /* http://www.domain.com/parked.php?domain=$1


I've not tested the above but I know the idea works, the apache docs on this are:
http://httpd.apache.org/docs/mod/mod_rewrite.html
 
.

very interesting replies guys, if anyone has a php script that can look at individual index.php files depending on what url is coming to the domain i would appreciate it. I also willing to pay if someone can comeup with one that monitors stats aswell :)

thanks in advance.

laskos
 
Both can be equally good - it depends how they are setup.
 
laskos said:
any help/advice appreciated on how to set it up correctly.
I would work back from what you think is good SEO and then make the scripts / htaccess etc work to that.

Everyones views are usually different on SEO :)
 
What are you intending to place on the "landing pages"?

Ideally I would have thought that you'd like the flexibility to direct a domain to a specific page / set of pages that you've created but would generally want a suitable optimised page to be generated automatically.

You could create a database containing keywords for each domain which any script would then use as a basis to draw in appropriate content and adverts.

I would also recommend for SEO purposes not having a single landing page but a whole site of relevant interlinked pages.

Assuming your 500 domains are generating (or have to potential to generate) enough income to warrant it I think there's a better solution - get a dedicated or virtual server and point all the domains to that. This will enable all your sites to appear as separate sites to the search engines and give you maximal flexibility in terms of having a default automated way of generating pages and options for "special promotion" of valuable domains.

Do PM me if you are interested in contracting me to comprehensively review and evaluate the options with a view to producing a specification for the required system and moving on to implementation.
 
Status
Not open for further replies.

The Rule #1

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

Featured Services

Sedo - it.com Premiums

IT.com

Premium Members

AucDom
UKBackorder
Be a Squirrel
Acorn Domains Merch
MariaBuy Marketplace

New Threads

Domain Forum Friends

Other domain-related communities we can recommend.

Our Mods' Businesses

Perfect
Service
Laskos
URL Shortener
*the exceptional businesses of our esteemed moderators
Top Bottom