Restricting file access

Zogg

New member
Hi.

I know it can be done ('cause I've seen it repeatedly) but...


How can I restrict use of 1 (ONE) cgi script to a block of IP addresses (preferably with a redirection if not from the IP pool)?

I know it's to do with .htaccess/.htconf (GET POST.....).

Any ideas??


Thanks in advance.

-------------------------
 
not wanting to sound too dumb, but im not 100% sure what ur on about.
If you want to redirect people from an ip block to annother page, you can do it with php.

a very basic way to do it in php is below:
?PHP
$ip = getenv("REMOTE_ADDR");
if ($ip == "xx.xx.xx.xx")
{
Header("Location: <a href='http://www.blah.com");' target='_blank'>http://www.blah.com");</a>
exit;
}
?>

im not "one" with cgi so I cant help there, as Kevin said, try hotscripts
 
Right.

What I wanted to do was block all access to a file on our servers, unless they were connected to the net with an IP from a certain IP pool?


Anyway, I got it sorted (using .htaccess file).


Thanks anyway.



Chris
 
Top