Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

formmail.pl Modification for .htaccess

request to path cgi-sys

4:20 pm on Apr 10, 2003 (gmt 0)

10+ Year Member

key_master had posted the following last summer:

SetEnvIfNoCase Request_URI formmail ban
<Files ~ "\.cgi$\.pl$">
order deny,allow
deny from env=ban

Until now it was stopping all requests to cgi-bin for formamail with a 301 Forbidden. However, requests to cgi-sys are passing through with a code 200. Does anyone have any ideas about how to modify the code above for .htaccess?

Thanks in advance,

2:25 am on Apr 11, 2003 (gmt 0)

10+ Year Member

Do you by chance have this .htaccess file in your cgi-bin directory? If so, it would only affect files/requests in that directory.

If so, add it to the cgi-sys directory also.

3:00 am on Apr 11, 2003 (gmt 0)

10+ Year Member


From what I understand about .htaccess, it can only be placed in the root directory. As I mentioned, it has worked fine stopping requests to cgi-bin. Surprisingly, there is no cgi-sys directory.


3:05 am on Apr 11, 2003 (gmt 0)

10+ Year Member

.htaccess affects the directory it is in (which can be any directory) and directories below it.

Not sure on your original question, hope someone can answer that for you. Looks to me like it should work. If there is no cgi-sys dir then they should get a 404 anyway.

7:58 am on Apr 11, 2003 (gmt 0)

10+ Year Member

I meant 403 Forbidden, not 301.


10:39 pm on Apr 12, 2003 (gmt 0)

10+ Year Member

Anyone have any suggestions on how to ban access to cgi-sys?



Featured Threads

Hot Threads This Week

Hot Threads This Month