![]() |
|
| Domain Name Sales | Domain Software | Calculate UK Domain Drop Dates | Domain Registration | NameDrive | Domain Parking | Subscribe to our Domains For Sale newsletter |
| | ||||||
| Home | Register | Rules | Membership Upgrade | Domains For Sale | Domain Name Escrow | Mark Forums Read | Domain Classified | Chat Room |
| General Domain Parking Discuss Domain Parking options for your portfolio. click here for a Domain Parking guide |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) |
![]() | parking script needed
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 |
| |
| | #4 (permalink) |
![]() |
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. |
| |
| | #5 (permalink) |
![]() |
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 |
| |
| | #6 (permalink) |
![]() | 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 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 |
| |
| | #7 (permalink) |
![]() | .
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 |
| |
| | #8 (permalink) |
| Administrator |
Which is more SEO friendly? .htaccess or a script?
__________________ Domain Appraisal | Domain Escrow Service | UK Appliances | Surrey Deals | Domain Auctions from Acorn Domains Subscribe to our Domains For Sale newsletter :: Submit a Domain For Sale to our newsletter :: Domains For Sale |
| |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |