Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

www redirects to google - script problem

Asked Modified Viewed 2,031 times
D
Dyegov
D
Dyegov 10
  • Junior Member, joined since
  • Contributed 35 posts on the community forums.
  • Started 10 threads in the forums
  • Started this discussions
asked
Junior Member

Hi. I'm having problems with my domain, but they're related to the script. Early yesterday my site was attacked by spambots, but I solved that easily. Then I noticed that if I tried to access myu site with the domain http://www.evanatics.com it redirected to Google, but if I accessed with http://evanatics.com it worked normally.

I asked both my hosting support and my domain support, and both came to the conclusion that it was a problem in the script. I don't know if during the attack someone got access to my hosting account and added some malicious redirection. I've tried replacing some files with the original ones, but it didn't work. Could someone please help me?
0 replies

7 posts

W
WEC
W
WEC 10
  • Veteran Member, joined since
  • Contributed 946 posts on the community forums.
  • Started 5 threads in the forums
answered
Veteran Member

This is from maincore.php:

// Check if users full or partial ip is blacklisted
$sub_ip1 = substr(USER_IP,0,strlen(USER_IP)-strlen(strrchr(USER_IP,".")));
$sub_ip2 = substr($sub_ip1,0,strlen($sub_ip1)-strlen(strrchr($sub_ip1,".")));
if (dbcount("(*)", "blacklist", "blacklist_ip='".USER_IP."' OR blacklist_ip='$sub_ip1' OR blacklist_ip='$sub_ip2'")) {
   header("Location: http://www.google.com/"); exit;
}


Blacklisted will be redirected to google.
0 replies
S
Sveinungs
S
  • Veteran Member, joined since
  • Contributed 935 posts on the community forums.
  • Started 3 threads in the forums
answered
Veteran Member

I'm also "blacklisted" using http://www.evanatics.com

Have you put anything in your adminpanel -> user admin -> blacklist after the spam attack? Like a one or more partial IP address(es)?
0 replies
D
Dyegov
D
Dyegov 10
  • Junior Member, joined since
  • Contributed 35 posts on the community forums.
  • Started 10 threads in the forums
  • Started this discussions
answered
Junior Member

I added to complete ips to the ban list, but even after removing them it didn't work. And why does it redirect with www but without it it doesn't?
0 replies
W
WEC
W
WEC 10
  • Veteran Member, joined since
  • Contributed 946 posts on the community forums.
  • Started 5 threads in the forums
answered
Veteran Member

Check which Site URL you have set in system admin main settings.

If you have http://www.evanatics.com/ set, then you need to access the site via that url.

If you access it via the http://evanatics.com, then you will be kicked off after logging in and starting to browse the site.
0 replies
D
Dyegov
D
Dyegov 10
  • Junior Member, joined since
  • Contributed 35 posts on the community forums.
  • Started 10 threads in the forums
  • Started this discussions
answered
Junior Member

Quote

WEC wrote:
Check which Site URL you have set in system admin main settings.

If you have http://www.evanatics.com/ set, then you need to access the site via that url.

If you access it via the http://evanatics.com, then you will be kicked off after logging in and starting to browse the site.


I have http://www.evanatics.com/ set in the main settings, but if I access with http://evanatics.com, I can login and browse normally :o
0 replies
W
WEC
W
WEC 10
  • Veteran Member, joined since
  • Contributed 946 posts on the community forums.
  • Started 5 threads in the forums
answered
Veteran Member

That's because you have logged in on both addresses then and set a cookie for each of them. Still, you should use the address set in system admin or you may see some pages not working as intended.

Try to replace the code quoted above with this in order to disable the section in maincore.php that will redirect to google:

/*
// Check if users full or partial ip is blacklisted
$sub_ip1 = substr(USER_IP,0,strlen(USER_IP)-strlen(strrchr(USER_IP,".")));
$sub_ip2 = substr($sub_ip1,0,strlen($sub_ip1)-strlen(strrchr($sub_ip1,".")));
if (dbcount("(*)", "blacklist", "blacklist_ip='".USER_IP."' OR blacklist_ip='$sub_ip1' OR blacklist_ip='$sub_ip2'")) {
header("Location: http://www.google.com/"); exit;
}
*/


If you are stil redirected to google, then it's not caused by the maincore code. Restore the maincore.php after the test.

When i try to access http://www.evanatics.com/ i'm redirected to google.


0 replies
D
Dyegov
D
Dyegov 10
  • Junior Member, joined since
  • Contributed 35 posts on the community forums.
  • Started 10 threads in the forums
  • Started this discussions
answered
Junior Member

One of the php variables of my host was acting strange, and assigned one of the spammers the IP of the server itself. By banning it I banned my own site, and that's why no one could access it. Now it's working perfectly. Thanks for your help nonetheless ;)
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 7 posts
  • Votes 0 votes
  • Topic users 3 members

0 participants

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet