Med RewriteMap alt er muligt:
RewriteMap examplemap prg:/path/to/file.php
RewriteRule (.*) ${examplemap:$1}
Du kan bruge mod_dbd også:
DBDriver mysql
DBDParams "host=localhost,user=db_user,pass=password,dbname=db"
RewriteMap myquery "dbd:select new_url from rewrite where old_url = %s"
RewriteRule (.*) ${myquery:$1}