mod_rewrite with /cgi-bin/
I am fiddling around with a little script to log IP addresses of people scanning my server for formmail.pl/cgi and am having a heck of a time trying to get a rewriterule working.It seems it has something to do with how users' cgi-bin directory is setup.
I added this rule to my .htaccess in the root of a site (for testing):
RewriteRule ^cgi-bin/formmail.cgi index.php?query=worked
And it returns a 404 error.
However, if I create a dir called cgi-test and then add this rewrite rule:
RewriteRule ^cgi-test/formmail.cgi index.php?query=worked
it redirects just peachy.
I have picked through the apache config files and I am not sure what would be causing this problem. I can change the script alias for the site to"
ScriptAlias /cgi-bin/ /home/user/public_html/cgi-test/ and it will redirect just fine.
What in the bloody heck am I missing?! :p