This forms the basis of Zeus' rewrite equivalent for the mod_rewrite code block. This assumes that Magento is installed in a folder called /magento/. The basis of the rule is that without a rewrite, the URL format is index.php/list/of/page/paths. Adding the rewrite options simply removes the index.php part.
match URL into $ with /js/
if matched then goto END
match URL into $ with ^/magento/(.*)
if matched then
map path into SCRATCH:path from %{URL}
look for file at %{SCRATCH:path}
if not exists then look for dir at %{SCRATCH:path}
if not exists then set URL = /magento/index.php/$1
endif
