Ketchup Posted January 11, 2017 Share Posted January 11, 2017 (edited) Don't mean to necro but... On 5/20/2016 at 9:18 AM, ranges said: what if i have dynamic ip? You can use a service like no-ip and have your ip linked to the domain. Then you would just allow the domain in the htaccess. This requires you to though to have the app installed and on though. It is a work around though. Also this blocking can be done this way to with php: Cloudflare: <?php $ValidCheck = array('IP GOES HERE'); if (!in_array($_SERVER['HTTP_CF_CONNECTING_IP'],$ValidCheck)) { header('Location: http://mycoolepicsite.com'); // change according to your site setup exit(); } ?> Non-Cloudflare: <?php $ValidCheck = array('IP GOES HERE'); if (!in_array($_SERVER['REMOTE_ADDR'],$ValidCheck)) { header('Location: http://mycoolepicsite.com'); // change according to your site setup exit(); } ?> Edited January 11, 2017 by Ketchup Editor QQ Quote Link to comment Share on other sites More sharing options...
Xenforo user Posted April 16, 2017 Share Posted April 16, 2017 Does this work on Xenforo? ty really like to know Quote Link to comment Share on other sites More sharing options...
Cookie Monster Posted April 16, 2017 Share Posted April 16, 2017 4 hours ago, Xenforo user said: Does this work on Xenforo? ty really like to know As long as you have apache you can use that trick its htaccess So in theory <Files admin.php> Order Deny,Allow Deny from all Allow from YOUR.IP.HERE. </Files> What this file says is that any source will be denied access, then it checks if you are that IP. Problem you find is if you have a dynamic IP your been denied when it changes unless you change the file The files part indicates what files this is applied to. Quote Liked what i posted remember to feed me a cookie ->Or you can add a cookie to my Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.