Search code examples
mod-rewriteurl-rewritingzeus

Zeus Rewrite Rules


I have a website that renders the URL:

/work.php?cat=identity

Normally I would research how to use mod_rewrite but unfortunately my hosting (Namesco) uses Zeus and not Apache, which is strange. How would I use Zeus' rewrite rules to convert to:

/work/identity

This is a much cleaner, nicer SEO friendly version. On top of this, I still need the $_GET variable to be active because it requests information about the variable cat from the database.

I've never rewritten URLs before so I've no idea where to begin. I've attempted the change with this rewrite.script file which is saved within my web folder

match URL into $ with ^/work.php?cat=/(.*)
if matched set URL= /work/$

Unfortunately it doesn't work. Can anyone help or perhaps offer an alternative?


Solution

  • had a quick play with this, and I believe I have proven to myself that the Request Rewriting is not able to manipulate the query element of the URL.

    There is a potential solution, but it gets even more ugly!

    You could use the "Perl Extensions" of ZWS to achieve this. Essentially you pass the request to the Perl engine within ZWS run a script against it, then pass the result back to the ZWS.

    I am afraid this is a bit beyond my capabilities however! I am a "Zeus Traffic Manager" sort of chap...

    Nick