PDA

View Full Version : deny IP's from executing c.cgi ......... possible?


'Plat
03-14-2002, 07:02 AM
Using .htaccess or some other way, can i block access from certain IP's to not use c.cgi ?

jayeff
03-14-2002, 07:22 AM
You can use this:<br /><br />order allow,deny<br />allow from all<br />deny from 12.220.204.214<br />deny from 12.220.204.<br /><br />(the second line would block the whole Class C, not just a single IP)<br /><br />...or you could use mod_rewrite.<br /><br />But both these methods will block access to whole directories (or sites, depending on where you locate your htaccess), not single files.<br /><br />Otherwise, as far as I know, you would need to be able to block the IP's from within c.cgi (or if it were encoded and you couldn't modify it, filter everything through another script first).

'Plat
03-14-2002, 08:16 AM
i figured it out.<br /><br />made a small php script in the main public_html directory that redirects to c.cgi.<br /><br />works nicely