Get Paid to Participate - up to $1 per post!     Twitter     Facebook     Google+
Hosting Discussion
 

forgot password?



Reply


Old
  Post #1 (permalink)   08-12-2002, 06:47 AM
HD Newbie
 
Join Date: Aug 2002
Posts: 5

Status: Zogg is offline
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.

-------------------------
 
 
 


Old
  Post #2 (permalink)   08-12-2002, 07:33 AM
HD Addict
 
Join Date: Jun 2002
Posts: 144

Status: Kevin is offline
Maybe HotScripts.com will have something... :wink:
__________________
Kevin Harris
kevin@tek-studios.net
F4H Masta Mod
 
 
 


Old
  Post #3 (permalink)   08-12-2002, 10:54 AM
HD Addict
 
Join Date: Jul 2002
Location: London, UK
Posts: 241

Status: Andrew is offline
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
__________________
Andrew
Managing Director - AGCC Group
http://agccworld.com I http://agcc.biz I http://agcc.net
 
 
 


Old
  Post #4 (permalink)   08-12-2002, 01:27 PM
HD Newbie
 
Join Date: Aug 2002
Posts: 5

Status: Zogg is offline
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
 
 
 
Reply

Thread Tools

New Post New Post   Old Post Old Post
Posting Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Sponsored By: