Forum Moderators: phranque

Message Too Old, No Replies

Zeus and the mod_rewrite rules

Read Zeus Documentation, MailingLists, WebmasterWorld...

         

1stTrade

5:14 pm on Nov 8, 2004 (gmt 0)

10+ Year Member



I´m trying to get some Apache rewrite Rules to work, but the Zeus Converter translates them wrong (just dont work). According to Manual ( [support.zeus.com...] ) it should be quite easy, but it isn´t ...

Some other guy asked a similar question at the Zeus Mailing List, without a reply.

The desired rewrite rule is:

RewriteEngine on
Options +FollowSymLinks
RewriteRule ^t([0-9]+).html$ showthread.php?t=$1 [L]
RewriteRule ^lastpostinthread([0-9]+).html$ showthread.php?goto=lastpost&t=$1 [L]
RewriteRule ^newpostinthread([0-9]+).html$ showthread.php?goto=newpost&t=$1 [L]
RewriteRule ^f([0-9]+).html$ forumdisplay.php?f=$1 [L]

thx in advance for any help

PCInk

5:42 pm on Nov 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



[support.zeus.com...]

On page 142.

Probably quicker to learn Zeus and write your own rules.

1stTrade

4:22 pm on Nov 9, 2004 (gmt 0)

10+ Year Member



But even when i apply these rules from the manual it doesn´t work.

eg.:

RULE_0_START:
match URL into $ with ^thread([0-9]+).html$
if matched set URL = showthread.php?t=$1
RULE_0_END:

or even

RULE_0_START:
match URL into $ with ^thread([0-9]+).html$
if not matched then goto RULE_0_END
if matched set URL = showthread.php?t=$1
goto END
RULE_0_END:
if not matched then goto RULE_2_END

I cant write my own rules, i need them for a vbulletin...

hope anyone has a clue to work this out *praying* ;)

encyclo

4:32 pm on Nov 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What do you mean exactly by "doesn't work"? Does the rewrite rule break the page/site, does it simply have no effect, or does the server catch fire? :)

The rewriting functionality in Zeus is a recent addition to their software, so it isn't available in older versions. Which precise version of Zeus is your hosting provider using? If it's still version 3.x, you're out of luck.

1stTrade

4:58 pm on Nov 9, 2004 (gmt 0)

10+ Year Member



What do you mean exactly by "doesn't work"? Does the rewrite rule break the page/site, does it simply have no effect, or does the server catch fire? :)
The rewriting functionality in Zeus is a recent addition to their software, so it isn't available in older versions. Which precise version of Zeus is your hosting provider using? If it's still version 3.x, you're out of luck.

"doesn´t work" means "Page not found"

The Zeus Version is 4.3 , and the mod_rewrite converter provided by Zeus does not work neither.

encyclo

5:06 pm on Nov 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



"doesn´t work" means "Page not found"

What does the URL produced in the address bar look like? That might give an indication as to what's wrong with the rule.

1stTrade

6:22 pm on Nov 9, 2004 (gmt 0)

10+ Year Member



404, Requested URL: e.g.:
f2-main-forum.html (works with apache)

Tried with a better rewrite rule but still doesn´t work.

Apache Rewrite Rule:

RewriteEngine On
Options +FollowSymLinks
RewriteRule ^t([0-9]+)-(.*).html$ showthread.php?t=$1 [L]
RewriteRule ^lastpostinthread([0-9]+).html$ showthread.php?goto=lastpost&t=$1 [L]
RewriteRule ^newpostinthread([0-9]+).html$ showthread.php?goto=newpost&t=$1 [L]
RewriteRule ^f([0-9]+)-(.*).html$ forumdisplay.php?forumid=$1 [L]

mod_rewrite converted by zeus:

RULE_0_START:
match URL into $ with ^t([0-9]+)-(.*).html$
if not matched then goto RULE_0_END
# Source line 3
# Second half of: RewriteRule ^t([0-9]+)-(.*).html$ showthread.php?t=$1 [L]
set URL = showthread.php?t=$1
# This rule has [L]
goto END
RULE_0_END:

RULE_1_START:
match URL into $ with ^lastpostinthread([0-9]+).html$
if not matched then goto RULE_1_END
# Source line 4
# Second half of: RewriteRule ^lastpostinthread([0-9]+).html$ showthread.php?goto=lastpost&t=$1 [L]
set URL = showthread.php?goto=lastpost&t=$1
# This rule has [L]
goto END
RULE_1_END:

RULE_2_START:
match URL into $ with ^newpostinthread([0-9]+).html$
if not matched then goto RULE_2_END
# Source line 5
# Second half of: RewriteRule ^newpostinthread([0-9]+).html$ showthread.php?goto=newpost&t=$1 [L]
set URL = showthread.php?goto=newpost&t=$1
# This rule has [L]
goto END
RULE_2_END:

RULE_3_START:
match URL into $ with ^f([0-9]+)-(.*).html$
if not matched then goto RULE_3_END
# Source line 6
# Second half of: RewriteRule ^f([0-9]+)-(.*).html$ forumdisplay.php?forumid=$1 [L]
set URL = forumdisplay.php?forumid=$1
# This rule has [L]
goto END
RULE_3_END:

PCInk

7:34 pm on Nov 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Are you putting the rules into the Zeus admin panel or into the htaccess file?

Rules in the htaccess are ignored - they must go into the admin panel as described in the manual (although the manual says so, it is not very clear or easy to find!).

1stTrade

7:45 pm on Nov 9, 2004 (gmt 0)

10+ Year Member



Rules are applied at the admin panel, not in the htaccess file

1stTrade

5:33 pm on Nov 10, 2004 (gmt 0)

10+ Year Member



does no one have a clue?