21
phatty
Re: domain.com & www.domain.com
  • 2004/3/15 16:13

  • phatty

  • Just popping in

  • Posts: 70

  • Since: 2004/3/9 2


Hello, been there and tried that... when I do that I get errors like "module not found" etc... anything else you can think of? Thanks for the quick reply.

Jeff

22
phatty
Re: domain.com & www.domain.com
  • 2004/3/15 16:14

  • phatty

  • Just popping in

  • Posts: 70

  • Since: 2004/3/9 2


Hello, been there and tried that... when I do that I get errors like "module not found" etc... anything else you can think of? Thanks for the quick reply.

Jeff

23
phppp
Re: domain.com & www.domain.com
  • 2004/3/15 16:21

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


A patch could be found at the sourceforge-xoops.
Though I am not sure whether that's the official solution.

24
phatty
Re: domain.com & www.domain.com
  • 2004/3/15 16:47

  • phatty

  • Just popping in

  • Posts: 70

  • Since: 2004/3/9 2


That did it!!!!! Thanks a TON!!!!

Jeff

25
DonXoop
Re: domain.com & www.domain.com

Quote:
phatty wrote:
That did it!!!!! Thanks a TON!!!!

Jeff

What did it, settings, DNS, hack, or a patch?

26
phatty
Re: domain.com & www.domain.com
  • 2004/3/15 17:03

  • phatty

  • Just popping in

  • Posts: 70

  • Since: 2004/3/9 2


Sorry bout that, got too excited...

Here's the link to the sourceforge site with the patch info.

Sourceforge

Here's the code:

the fix is really small:

Replace:

$url_arr = explode('/',
str_replace(str_replace('https://', 'http://',
XOOPS_URL.'/modules/'), '',
'http://'.$HTTP_SERVER_VARS['HTTP_HOST'].$xoopsRequestUri));
$module_handler =& xoops_gethandler('module');
$xoopsModule =& $module_handler->getByDirname($url_arr[0]);

with:

preg_match("/modules\/(\w*)/",$xoopsRequestUri,$url_arr);
$module_handler =& xoops_gethandler('module');
$xoopsModule =& $module_handler->getByDirname($url_arr[1]);


The above takes place in the common.php file located in the includes folder. Then I simply added the www in my mainfile.php and I am off and running

Remember to save backup files in case something goes wrong

27
DonXoop
Re: domain.com & www.domain.com

Interesting. My site is set the other way, domain.com. I've been handling the www. and other variations in Apache with good success. This patch might give me even more options.

Login

Who's Online

371 user(s) are online (308 user(s) are browsing Support Forums)


Members: 0


Guests: 371


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