31
jlm69
Re: Why am I being redirected here?
  • 2006/1/25 19:12

  • jlm69

  • Module Developer

  • Posts: 719

  • Since: 2002/7/19


You can find that language file in modules/system/language/your_language/error.php


I don't know anything about this problem, but if you have changed the mainfile from http://yoursite.com to http://www.yoursite.com and it is still going to http://yoursite.com sometimes.

I would make a backup of your sites database and open it up in a text editor. Use the find option to look for http://yoursite.com if you find it see what table it is in, then go in that table of your database and change to http://www.yoursite.com.

Search the whole sql file.

I had to do that once when I was using an IP address to set a site up.

Hope this helps,

John

32
bigzaphod
Re: Why am I being redirected here?
  • 2006/1/25 19:38

  • bigzaphod

  • Just popping in

  • Posts: 25

  • Since: 2005/9/27


OK, what you need to do is edit the maihfile.php, delete the files in the /xoops/html/templates_c folder (they will be files with several % in the name) and update your system module.

For my site I had to create a 'splash' screen that sent people to my http://www.mysite.com/xoops/html...that way, it didn't matter if they visited with the www or non-www address they would always get the www. XOOPS site and the referer works perfectly now.

33
nachenko
Re: Why am I being redirected here?
  • 2006/2/14 10:37

  • nachenko

  • Quite a regular

  • Posts: 356

  • Since: 2005/1/18


Hi everyone.

I had this problem when i wrote the URL without the www.

As you can see here:

http://www.ecro2006.com


There is a login form. It worked fine when i wrote http://www.ecro2006.com but not when i ommitted the www. The URL specified in my mainfile includes de www on the address.

Fix for this on XOOPS 2.2.3:
Open class/xoopssecurity.php, go around line 174 and locate function "checkReferer".

Quote:

function checkReferer($docheck=1)
{
if ($docheck == 0) {
return true;
}
$ref = xoops_getenv('HTTP_REFERER');
if ($ref == '') {
return false;
}
$pref = parse_url($ref);
if ( $pref['host'] != $_SERVER['HTTP_HOST']) {
return false;
}
return true;
}


Replace it with:

Quote:

function checkReferer($docheck=1)
{
if ($docheck == 0) {
return true;
}
$ref = xoops_getenv('HTTP_REFERER');
if ($ref == '') {
return false;
}
$pref = parse_url($ref);
// Hack: check referer twice. First one is the original check, and the second one is same check without the www.
if ( $pref['host'] != $_SERVER['HTTP_HOST'] && $pref['host'] != str_replace ("www.", "", $_SERVER['HTTP_HOST'])) {
return false;
}
return true;
}


Hope it helps.

See ya.

34
psmith
Re: Why am I being redirected here?
  • 2006/2/17 22:38

  • psmith

  • Just popping in

  • Posts: 2

  • Since: 2006/2/16


I had the same problem on my site, but the error was happening through my flash header. I was logged into "http://mysite.com" and when i was clicking "home" on my flash header, I had it sending me to "http://www.mysite.com". I took out the www. and now it works fine.

Login

Who's Online

426 user(s) are online (363 user(s) are browsing Support Forums)


Members: 0


Guests: 426


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits