mod_rewrite notes: cgi-bin translating

Beatnik on 2007-03-15T20:25:24

In modules.conf:

LoadModule rewrite_module /usr/lib/apache/1.3/mod_rewrite.so
AddModule mod_rewrite.c
In httpd.conf (for debugging purposes):
RewriteLog /var/log/apache-perl/rewrite_log
RewriteLogLevel 9
. In a .htaccess file in your main document root:
RewriteEngine On
RewriteBase /
RewriteRule ^directory/(.*) cgi-bin/script?args=$1 [L]
This took me a while to figure out.. and it isn't perfect ofcourse. Consider directory to be the virtual directory you wish to use.