31
disky
Re: Rewriting module URLs
  • 2006/1/12 8:14

  • disky

  • Just popping in

  • Posts: 90

  • Since: 2003/10/31


Hi Mikeytheman

Do you get any info if you enable php debug in admin/preference ?

32
mikeytheman
Re: Rewriting module URLs

I turned that on when I read this message, but this time in IE rather than FireFox like I had previously. Unlike Firefox though, instead of a blank screen though it displayed the Page Not Found so I'm now thinking it's probably my host. I emailed GoDaddy about this and they said they couldn't see anything wrong and asked for more details. Their support FAQ says they support mod_rewrite, so I'm not sure what I'm doing wrong.

33
disky
Re: Rewriting module URLs
  • 2006/1/13 18:18

  • disky

  • Just popping in

  • Posts: 90

  • Since: 2003/10/31


Try with this rule:

RewriteRule ^justATest/$ /index.php [L]

And type:

http://www.YourDomain.com/justATest/

In the browser, if it shows the frontpage mod_rewrite works.

34
mikeytheman
Re: Rewriting module URLs

That worked lol. It's actually the first thing that's worked with any of the mod_rewrite examples that I've seen, anywhere. So, ummm, what was I doing wrong in my first example of code? (That was basically just copied from examples here)

:) thanx in advance btw...i'm seeming completely retarded with this...and i don't get what's wrong lol

35
disky
Re: Rewriting module URLs
  • 2006/1/14 12:25

  • disky

  • Just popping in

  • Posts: 90

  • Since: 2003/10/31


Glad to hear that at least works :)

try with this:

RewriteEngine On
RewriteBase /
RewriteRule ^forum/([0-9]+)$ /modules/newbb/viewforum.php?forum=$1 [L]

And try 'www.mydomain.com/forum/1' or what the forum number might be.

Did you remember this part:

I also had to change 1 line in includes/common.php
from:
$xoopsRequestUri = $_SERVER[ 'REQUEST_URI' ]; // Deprecated (use the corrected $_SERVER variable now)
to:
$xoopsRequestUri = $_SERVER[ 'SCRIPT_NAME' ];

If i remember correctly you will actually get blank screen if you forgot it.

I have no clue why it is not done in the core system allready, they even themself write it is 'deprecated'.

36
davidl2
Re: Rewriting module URLs
  • 2006/1/14 12:51

  • davidl2

  • XOOPS is my life!

  • Posts: 4843

  • Since: 2003/5/26


Disky - can you please post a link to this thread on devteam.xoops.org - in the 2.3 roadmap comments - so Skalpa can see this?

37
disky
Re: Rewriting module URLs
  • 2006/1/14 13:18

  • disky

  • Just popping in

  • Posts: 90

  • Since: 2003/10/31


Sure.

Only place i could find where i could post was in the forum:
http://sourceforge.net/forum/forum.php?thread_id=1420773&forum_id=347994

Hope it helps.

38
mikeytheman
Re: Rewriting module URLs

Quote:

disky wrote:
Glad to hear that at least works :)

try with this:

RewriteEngine On
RewriteBase /
RewriteRule ^forum/([0-9]+)$ /modules/newbb/viewforum.php?forum=$1 [L]

And try 'www.mydomain.com/forum/1' or what the forum number might be.

Did you remember this part:

I also had to change 1 line in includes/common.php
from:
$xoopsRequestUri = $_SERVER[ 'REQUEST_URI' ]; // Deprecated (use the corrected $_SERVER variable now)
to:
$xoopsRequestUri = $_SERVER[ 'SCRIPT_NAME' ];

If i remember correctly you will actually get blank screen if you forgot it.

I have no clue why it is not done in the core system allready, they even themself write it is 'deprecated'.

heh...hadn't made the change in includes/common.php...however...that didn't help completely...it seems picky..

i was able to make the following work:
RewriteRule ^forum/$ /stuff/index.php [L]
then i tried
RewriteRule ^forum/$ /stuff/whatever/index.php [L]
but as soon as i tried
RewriteRule ^forum/$ /modules/newbb/index.php [L]
it gave me the 404

so i'm wondering what's going on that it doesn't like the modules forum...lol would it be a completely turned around and messed up attempt in trying to do
RewriteRule ^forum/$ /modules/
and then inside /stuff/
have another one that does
RewriteRule ^modules/$ /newbb/
or something of that nature? i don't know...i'm starting to get really confused with what's going on

any resolution or advice would be great :)

39
mikeytheman
Re: Rewriting module URLs

Alright, thinking about this problem I've got and trying to figure out solutions, would it be posible to have files in the root directory like
forum.php
games.php
etc with each module that would be in interest of being mod_rewritten

each php file would basically include the modules index file...and then use mod_rewrite to modify the urls on THAT php file...the only problem i forsee is the way that the modules files include it's dependencies...whether it just recurses from it's location or uses the XOOPS relative path...i think that made sense lol any suggestions?

40
disky
Re: Rewriting module URLs
  • 2006/1/16 19:59

  • disky

  • Just popping in

  • Posts: 90

  • Since: 2003/10/31


Hi Mikey

I must admit i can't really figure out if your solution will work or not.

But i think the problem you might have is, that NewBB has a problem with the URL's being rewriten, just like Xoops'es core file did have :(

Maybe ask or search on newbb's homepage, somebody might help. Or post a new thread on this site. I have never used newbb so i am not much help there :(

Login

Who's Online

192 user(s) are online (126 user(s) are browsing Support Forums)


Members: 0


Guests: 192


more...

Donat-O-Meter

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

Latest GitHub Commits