rendered paste bodytail -f /var/log/apache2/rewrite.log
127.0.0.1 - - [03/Apr/2008:14:57:04 --0500] [localhost/sid#80b98e0][rid#84106b0/initial] (2) init rewrite engine with requested uri /perm/1
127.0.0.1 - - [03/Apr/2008:14:57:04 --0500] [localhost/sid#80b98e0][rid#84106b0/initial] (3) applying pattern '^/perm/(.*)' to uri '/perm/1'
127.0.0.1 - - [03/Apr/2008:14:57:04 --0500] [localhost/sid#80b98e0][rid#84106b0/initial] (5) map lookup OK: map=permalink key=1 -> val=http://google.com
127.0.0.1 - - [03/Apr/2008:14:57:04 --0500] [localhost/sid#80b98e0][rid#84106b0/initial] (2) rewrite '/perm/1' -> 'http://google.com'
127.0.0.1 - - [03/Apr/2008:14:57:04 --0500] [localhost/sid#80b98e0][rid#84106b0/initial] (2) implicitly forcing redirect (rc=302) with http://google.com
127.0.0.1 - - [03/Apr/2008:14:57:04 --0500] [localhost/sid#80b98e0][rid#84106b0/initial] (2) forcing 'http://google.com' to get passed through to next API URI-to-filename handler
Rules are:
RewriteMap permalink prg:/etc/apache2/rewrite.pl
RewriteRule ^/perm/(.*) ${permalink:$1} [PT]