Welcome to WebmasterWorld Guest from 54.167.46.29

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

formmail.pl Modification for .htaccess

request to path cgi-sys

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

Preferred Member

10+ Year Member

joined:Nov 26, 2002
posts:520
votes: 0


key_master had posted the following last summer:

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

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,
Ted

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

Preferred Member

10+ Year Member

joined:Jan 11, 2003
posts:442
votes: 0


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)

Preferred Member

10+ Year Member

joined:Nov 26, 2002
posts:520
votes: 0


marcs,

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.

Ted

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

Preferred Member

10+ Year Member

joined:Jan 11, 2003
posts:442
votes: 0


.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)

Preferred Member

10+ Year Member

joined:Nov 26, 2002
posts:520
votes: 0


I meant 403 Forbidden, not 301.

Ted

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

Preferred Member

10+ Year Member

joined:Nov 26, 2002
posts:520
votes: 0


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

Thanks,
Ted