Welcome to WebmasterWorld Guest from 54.146.206.127

Forum Moderators: Ocean10000 & phranque

Message Too Old, No Replies

Zeus and the mod_rewrite rules

Read Zeus Documentation, MailingLists, WebmasterWorld...

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

New User

10+ Year Member

joined:Oct 23, 2003
posts:11
votes: 0


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

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

Senior Member from GB 

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

joined:Aug 13, 2003
posts:1046
votes: 1


[support.zeus.com...]

On page 142.

Probably quicker to learn Zeus and write your own rules.

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

New User

10+ Year Member

joined:Oct 23, 2003
posts:11
votes: 0


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* ;)

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

Senior Member from CA 

WebmasterWorld Senior Member encyclo is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Aug 31, 2003
posts:9074
votes: 6


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.

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

New User

10+ Year Member

joined:Oct 23, 2003
posts:11
votes: 0


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.

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

Senior Member from CA 

WebmasterWorld Senior Member encyclo is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Aug 31, 2003
posts:9074
votes: 6


"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.

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

New User

10+ Year Member

joined:Oct 23, 2003
posts:11
votes: 0


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:

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

Senior Member from GB 

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

joined:Aug 13, 2003
posts:1046
votes: 1


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!).

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

New User

10+ Year Member

joined:Oct 23, 2003
posts:11
votes: 0


Rules are applied at the admin panel, not in the htaccess file
5:33 pm on Nov 10, 2004 (gmt 0)

New User

10+ Year Member

joined:Oct 23, 2003
posts:11
votes: 0


does no one have a clue?