[Techtalk] Zeus rewrite rules

Almut Behrens almut-behrens at gmx.net
Tue Dec 28 22:25:55 EST 2004

On Tue, Dec 28, 2004 at 12:04:14PM +1100, Kathryn Andersen wrote:
> Anyone here familiar with Zeus rewrite rules?
> Because my web-host uses Zeus rather than Apache, I need to convert some
> Apache rewrite rules to Zeus format, so that I can run a particular CGI
> script (which I've tested on my own PC with Apache) on my actual
> web-host in the same way.
> These are the original Apache rules:
> # Apache rewrite
> RewriteEngine on
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule ^(.*)$ posy.cgi/$1 [L,QSA]
> The idea is to call the posy.cgi script with the PATH_INFO set to the
> requested URL, if and only if the file or directory is not found.
> This is what I came up with for the Zeus rewrite rules, but they aren't
> working.  Instead of it calling the CGI script, it just comes up with
> the standard 404 Not Found page.

I haven't got the faintest how to do URL rewriting in Zeus, so this
is just an idea...  Maybe, rewriting is not really your problem, but
rather the so-called "URL look back" feature of Apache -- which might
be missing in general / not enabled by default / specifically not
working with rewritten URLs ... in Zeus.
This feature makes URLs of the form


work, because Apache can figure out that somescript.cgi is to be called
with "/path/passed/as/parameter" stripped off and passed as argument to
the script.  According to the CGI standard, you'd normally have to
write something like


and then in the script extract the parameter "path" from the
environment variable QUERY_STRING.
If the regular CGI way works, you might simply leave it at that...

Or, maybe, an equivalent of the "look back" feature might need to be
enabled explicitly in Zeus (like in Apache > 2.0.30 (AcceptPathInfo)).
As I already said, I have no idea of the internal mechanics of Zeus.

If you want to try the "somescript.cgi?path=..." form, you might also
need to familiarise yourself with the way Zeus is handling CGI
parameters in rewritten URLs (stuff like [QSA] etc. in mod_rewrite...).

Good luck, and a Happy New Year to everyone,


More information about the Techtalk mailing list