Use a .htaccess file
Change 127.0.0.1 to your ip or the ip you want to unblock place it in the directory to whitelist other ips just add another allow from line.Code:order deny,allow deny from all allow from 127.0.0.1
This is a discussion on Bloking All Ips From Certain URL? within the Gunz Online forums, part of the MMO and MMORPG Developments category; is there anyway of blocking all ips to a certain url, and only be able to have ips that i ...
is there anyway of blocking all ips to a certain url, and only be able to have ips that i customly add to be able to acess a certain website, like adminpanel
exameple
www. g u nz.co m/adminpanel
and only have certain users be able to visit the "/adminpanel" part?
is it possible to do with windows firewall since im hosting the web of vps.
im not sure how to add a url type thingy in the windows firewall.
anyone have a clue.
THANKS :D!
Last edited by yurij13; 05-08-12 at 07:33 PM.
Use a .htaccess file
Change 127.0.0.1 to your ip or the ip you want to unblock place it in the directory to whitelist other ips just add another allow from line.Code:order deny,allow deny from all allow from 127.0.0.1
+Rep & +Like if You found my Post Useful.
No, like this:
Code:allow from 127.0.0.1 allow from 127.0.0.5 allow from 127.125.234.1
Are you using Cloudflare? It doesn't work with Cloudflare.
Add the following PHP code to your config file of the adminpanel.
And add the allowed IP's to the array.PHP Code:<?php
$_SERVER['REMOTE_ADDR'] = (isset($_SERVER['HTTP_CF_CONNECTING_IP']) && $_SERVER['HTTP_CF_CONNECTING_IP'] != "" ? $_SERVER['HTTP_CF_CONNECTING_IP'] : $_SERVER['REMOTE_ADDR']);
$allowedips = array("127.0.0.1", "127.0.0.5");
if(!in_array($_SERVER['REMOTE_ADDR'], $allowedips))
{
die("Access restricted");
}
?>