1
kain
apache and /modules/news
  • 2003/6/4 11:53

  • kain

  • Just popping in

  • Posts: 56

  • Since: 2002/1/9 9


hi there,
my default module is news, any hint how to set up apache configuration to displayhttp://www.foo.bar insted ofhttp://www.foo.bar/modules/news ?
TIA

2
kain
Re: apache and /modules/news
  • 2003/6/6 0:15

  • kain

  • Just popping in

  • Posts: 56

  • Since: 2002/1/9 9


sorry for bumping..
I've tried the php way, but nothing, there are too many class/include to modify and I can't rewrite part of core to do this..
maybe mod_rewrite for apache can work, but I think if we write a rule that points again to document root it will results in an infinite loop (index.php <-> /modules/news/index.php).
I don't want to use frames.. nobody out there have tried to solve this problem?

ps. I use XOOPS 1.3.10

3
Nitou
Re: apache and /modules/news
  • 2003/6/14 15:32

  • Nitou

  • Just popping in

  • Posts: 1

  • Since: 2002/12/8


Use mod_rewrite :

in .htaccess :

RewriteEngine on
RewriteRule ^$ /modules/news/index.php [L]
RewriteRule ^index.php$ /modules/news/index.php [L]
RewriteRule ^index.html$ /modules/news/index.php [L]

at racine of website (/www/)!

4
kain
Re: apache and /modules/news
  • 2003/6/14 22:14

  • kain

  • Just popping in

  • Posts: 56

  • Since: 2002/1/9 9


simply great, thank you, it works.

5
sunsnapper
Re: apache and /modules/news

For some reason, I'm not able to get this to work.

I note that you are using XOOPS 1.3.10.
I'm using XOOPS 2.0.5.

Scenario 1: No Error Message. Page loads properly.
Login and visit
http://www.brilliantenergy.com/modules/wfchannel/

MySQL/Blocks Debug Message
SELECT * FROM brilliant__modules WHERE dirname = 'wfchannel'


Scenario 2: Selected Module Does Not Exist
Login and visit
http://www.brilliantenergy.com/about/

MySQL/Blocks Debug Message
SELECT * FROM brilliant__modules WHERE dirname = 'http:'


Scenario 3: "Blank Page UGLY HTML"
Do not login... visit anonymously
http://www.brilliantenergy.com/about/

No MySQL/Blocks Debug Message Appears
Instead, I get a blank page comprised of HTML text in all caps.



Here are the mod_rewrite statements I am using:
[size=x-small]
RewriteEngine on
RewriteRule ^about/$ /modules/wfchannel/index.php?page=1 [L]
RewriteRule ^about$ /modules/wfchannel/index.php?page=1 [L]
[/size]

I've also tried:
[size=x-small]
RewriteEngine on
RewriteRule ^about/$http://www.brilliantenergy.com/modules/wfchannel/index.php?page=1 [L]
RewriteRule ^about$http://www.brilliantenergy.com/modules/wfchannel/index.php?page=1 [L]
[/size]


To rule out wfchannel, I also tried redirecting to newbb:
[size=x-small]
RewriteEngine on
RewriteRule ^about/$ /modules/newbb/ [L]
RewriteRule ^about$ /modules/newbb/ [L]
[/size]

All result in the same blank page comprised of HTML that would not seem to match XOOPS XHTML compliant output.

I recognize that in Scenario 2, an invalid module directory is being passed to Xoops. What I am trying to understand better is why this approach worked in XOOPS 1.3.x and why login causes the different behavior between Scenario 2 and 3. Also, curious if people have guesses as to workarounds.

6
onokazu
Re: apache and /modules/news
  • 2003/11/5 9:37

  • onokazu

  • XOOPS Founder

  • Posts: 617

  • Since: 2001/12/13


sunsnapper, try changing the following code around line 230 in common.php

$xoopsRequestUri = @xoops_getenv('REQUEST_URI');

to

$xoopsRequestUri = @xoops_getenv('SCRIPT_NAME');

7
sunsnapper
Re: apache and /modules/news

Fantastic. Thank You! That does work.



(Note: see this thread for details about having site work with brilliantenergy.com vs. www.brilliantenergy.com)

Login

Who's Online

181 user(s) are online (107 user(s) are browsing Support Forums)


Members: 0


Guests: 181


more...

Donat-O-Meter

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

Latest GitHub Commits