Page 1 of 1

Apache rewrite to Zues rewrites

Posted: Tue Jan 27, 2009 3:00 am
by frank_mark
Hi everyone,
Not sure where to post this, but I'm hoping someone will find it helpful. Please move it to the appropriate section if you can.

I just finished writing a site intended for Apache then the client purchases hosting that runs Zeus (whatever that is). Needless to say that the .htaccess I wrote was useless. The good people at Netregistry, though, were kind enough to translate the mod rewrites to Zeus.

Here's the Apache rewrites:

Code: Select all

 
RewriteRule ^.*/c([0-9]+)/$ /index.php?view=show_category&id=$1 [L]
 
RewriteRule ^.*p-([0-9]+)/$ /index.php?view=view_product&id=$1 [L]
 
RewriteRule ^sitemap.xml$ /sitemap.php?sitemap=google [L]
 
RewriteRule ^.*-i([0-9]+)\..*$ /i/catalogue/products/$1 [L]
 
RewriteRule ^.*-t([0-9]+)\..*$ /i/catalogue/thumbs/$1 [L]
 
RewriteRule ^/vision/$ /index.php?view=vision [L]
 

And here they are in Zeus:

Code: Select all

 
RULE_0_START:
match URL into $ with ^/.*/c([0-9]+)/$
if not matched then goto RULE_0_END
# Source line 4
# Second half of: RewriteRule ^/.*/c([0-9]+)/$ /index.php?view=show_category&id=$1 [L]
set URL = /index.php?view=show_category&id=$1
# This rule has [L]
goto END
RULE_0_END:
 
RULE_1_START:
match URL into $ with ^/.*p-([0-9]+)/$
if not matched then goto RULE_1_END
# Source line 6
# Second half of: RewriteRule ^/.*p-([0-9]+)/$ /index.php?view=view_product&id=$1 [L]
set URL = /index.php?view=view_product&id=$1
# This rule has [L]
goto END
RULE_1_END:
 
RULE_2_START:
match URL into $ with ^/sitemap.xml$
if not matched then goto RULE_2_END
# Source line 8
# Second half of: RewriteRule ^/sitemap.xml$ /sitemap.php?sitemap=google [L]
set URL = /sitemap.php?sitemap=google
# This rule has [L]
goto END
RULE_2_END:
 
RULE_3_START:
match URL into $ with ^/.*-i([0-9]+)\..*$
if not matched then goto RULE_3_END
# Source line 10
# Second half of: RewriteRule ^/.*-i([0-9]+)\..*$ /i/catalogue/products/$1 [L]
set URL = /i/catalogue/products/$1
# This rule has [L]
goto END
RULE_3_END:
 
RULE_4_START:
match URL into $ with ^/.*-t([0-9]+)\..*$
if not matched then goto RULE_4_END
# Source line 12
# Second half of: RewriteRule ^/.*-t([0-9]+)\..*$ /i/catalogue/thumbs/$1 [L]
set URL = /i/catalogue/thumbs/$1
# This rule has [L]
goto END
RULE_4_END:
 
RULE_5_START:
match URL into $ with ^/vision/$
if not matched then goto RULE_5_END
# Source line 14
# Second half of: RewriteRule ^/vision/$ /index.php?view=vision [L]
set URL = /index.php?view=vision
# This rule has [L]
goto END
RULE_5_END:
 
I didn't write them, so can't explain them. I hope you find them helpful though.