Welcome to WebmasterWorld Guest from 50.19.156.19

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

formmail.pl Modification for .htaccess

request to path cgi-sys

     

nativenewyorker

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
</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

marcs

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.

nativenewyorker

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

10+ Year Member



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

marcs

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.

nativenewyorker

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

10+ Year Member



I meant 403 Forbidden, not 301.

Ted

nativenewyorker

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

10+ Year Member



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

Thanks,
Ted