Hello thanks for reading my question
For some reason 2 days ago good and all the other bots suddenly starting hitting my site like
http://mysite.com/ bla bla bla
I have a security feature that I have installed in my header file that does the follow and this has been for a year or two now
IF ( strcmp( $_SERVER['HTTP_HOST'],'www.mytestsite.com') == 0 ) { #Test/Live Server Configs
#-- [ PHP ERRORS ] set error reporting level
error_reporting( E_ERROR | E_WARNING | E_PARSE ); // ADD | E_NOTICE
$site['url'] = "http://www.mytestsite.com/";
$site['url_main'] = "http://www.ia-swingerstest.com/";
$site['title'] = "Test V41";
$dir['root'] = "/home3/public_html/info/";
$dir['inc'] = "/home3/includefiles/";
$admin_dir = "admin";
$moderator_dir = "moderators";
$TestServer = TRUE;
DEFINE('JOIN_EN', FALSE ); # Enable Join with TRUE
}ELSEIF( strcmp( $_SERVER['HTTP_HOST'],'www.mymainsite.com') == 0 ) {
$site['url'] = "http://www.www.mymainsite.com/info/";
$site['url_main'] = "http://www.www.mymainsite.com/";
$site['title'] = "Community";
$dir['root'] = "/home/public_html/info/";
$dir['inc'] = "/home/incfiles/";
$admin_dir = "admin";
$moderator_dir = "moderators";
$TestServer = FALSE;
DEFINE('JOIN_EN', TRUE ); # Enable Join with TRUE
}ELSE{
DIE( "Illegal proxy access or hacking attempt, contact the admin of this site!" );
EXIT;
}
I don't know but some body may have linked to my site with the
http://mysite.com
So is there ANY draw back to do this
IF ( strcmp( $_SERVER['HTTP_HOST'],'www.mytestsite.com') == 0 ) { #Test/Live Server Configs
#-- [ PHP ERRORS ] set error reporting level
error_reporting( E_ERROR | E_WARNING | E_PARSE ); // ADD | E_NOTICE
$site['url'] = "http://www.mytestsite.com/";
$site['url_main'] = "http://www.ia-swingerstest.com/";
$site['title'] = "Test V41";
$dir['root'] = "/home3/public_html/info/";
$dir['inc'] = "/home3/includefiles/";
$admin_dir = "admin";
$moderator_dir = "moderators";
$TestServer = TRUE;
DEFINE('JOIN_EN', FALSE ); # Enable Join with TRUE
}ELSEIF( strcmp( $_SERVER['HTTP_HOST'],'www.mymainsite.com') == 0 ) {
$site['url'] = "http://www.www.mymainsite.com/info/";
$site['url_main'] = "http://www.www.mymainsite.com/";
$site['title'] = "Community";
$dir['root'] = "/home/public_html/info/";
$dir['inc'] = "/home/incfiles/";
$admin_dir = "admin";
$moderator_dir = "moderators";
$TestServer = FALSE;
DEFINE('JOIN_EN', TRUE ); # Enable Join with TRUE
}ELSE{
$CURL = 'http://www.mymainsite.com' . $_SERVER['REQUEST_URI'];
header ("HTTP/1.1 301 Moved Permanently");
header ("Location: $CURL");
DIE( "Illegal proxy access or hacking attempt, contact the admin of this site!" );
EXIT;
}
basically adding
$CURL = 'http://www.mymainsite.com' . $_SERVER['REQUEST_URI'];
header ("HTTP/1.1 301 Moved Permanently");
header ("Location: $CURL");
if the string compare fails
Why would the bots suddenly start crawling my site with http://mysite.com rather than the orignal http://www.mysite.com it all happend in one day