Forum Moderators: coopster & phranque

Message Too Old, No Replies

PENALTY for CGI Redirects? Primary and Secondary domains.

PENALTY for CGI Redirects? Primary and Secondary domains being redirected.

         

Tim Needs Help

9:02 pm on Jan 31, 2002 (gmt 0)



I use an INDEX.CGI script which points primary and secondary domains to different pages.

See details below.

Does anyone know if this can cause problems or penalties?

Any thoughts welcome.

$mainpage = "index.shtml";
%domains = (
'www.primary-domain.com' => 'index.shtml',
'www.secondary-domain1.com' => 'secondary-index.shtml',
'www.secondary-domain2.com' => 'secondary2-index.shtml',
);

The above will tell what the script does.
Anyone typing in ANY of the above three domains will FIRST be directed to INDEX.CGI.
( instead of the usual index.html )

The INDEX.CGI then REDIRECTS to specified pages.

If the typed in URL is:
www.primary-domain.com
They are directed to: index.shtml

If the typed in URL is:
www.secondary-domain1.com
They are directed to: secondary-index.shtml

If the typed in URL is:
www.secondary-domain2.com
They are directed to: secondary2-index.shtml

In summary: The CGI script points each DomainName to unique pages.

Brett_Tabke

9:25 pm on Jan 31, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



What are the headers that the above generates?

Tim Needs Help

9:31 pm on Jan 31, 2002 (gmt 0)



Here is the script:

When anyone types either the primary domain URL or secondary domain URLS, then the INDEX.CGI redirects them to the appropriate page to match the URL.

#!/usr/bin/perl

################################################################
# #
# DomainDirector v1.1 #
# Copyright ©1999 - Tintagel Consulting, LLC #
# dba Script Solutions #
# [scriptsolutions.com...] #
# All rights reserved #
# #
################################################################
# #
# PURPOSE OF PROGRAM: #
# #
# DomainDirector v1.1 allows you to direct parked domains to a #
# subdirectory of a "primary" domain. #
# #
# #
# INSTRUCTIONS: #
# #
# Installation instructions are in the readme.txt file that #
# was included in this distribution. #
# #
# #
# LICENSE AGREEMENT: #
# #
# By installing DomainDirector v1.1, you have #
# agreed to indemnify, defend, and hold harmless Tintagel #
# Consulting, LLC dba Script Solutions from any and all #
# liability, penalties, losses, damages, costs, expenses, #
# attorneys' fees, causes of action or claims caused by or #
# resulting indirectly from your use of this script which #
# damages either you, or any other party or parties without #
# limitation or exception. This indemnification and hold #
# harmless agreement extends to all issues associated with #
# this script. #
# #
################################################################

################################################################
# #
# EDIT BELOW #
# #
################################################################

$mainpage = "index.shtml";

%domains = (
'www.primary-domain.com' => 'index.shtml',
'www.secondary-domain1.com' => 'secondary-domain1.shtml',
'www.secondary-domain2.com' => 'secondary-domain2.shtml',
);

################################################################
# DO NOT CHANGE BELOW THIS LINE! #
################################################################

$server = lc($ENV{'HTTP_HOST'});if ($ENV{'HTTP_HOST'} =~ /(\d+)\.(\d+)\.(\d+)\.(\d+)/){$t='/'}else{if ($server !~ /^www./){$server = 'www.' . $server;}}@domains = keys(%domains);foreach $domain(@domains){if ($domain eq $server){print "Location: [${server}...] ($match){print "Location: [$server...]

Brett_Tabke

9:34 pm on Jan 31, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Get something like Proxomitron that you can view the headers that the server is sending out. You want seamless (no error codes) between pages.

Tim Needs Help

9:45 pm on Jan 31, 2002 (gmt 0)



Proxomitron

Ive downloaded Proxomitron.
It looks a bit vast.

I have windows xp.

which command do I use for headers.

Thanks.

ciml

11:01 am on Feb 1, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've never used Proxomitron but can recommend 'cg-eye interactive'. Web based and very quick and easy.

Calum