Reputation: 15
Ok guys.. hello. have a niceday.. My problem is totaly focus on .htacces for example i have a website : localhost/ and i want for every visitor have deny acces on website for first visit.. on every folder / every photo / everything. and when they acces a specific link for example: localhost/test.php to allow they ip add the ip in .httacess i think and have acces total on website..
I have something in my mind like.. deny all ips. acces link and receive allow ip and use can use entire website. and the ip for allow to be take from visitor when acces test.php and the ip going on .htaces with allow i know this work on denny acces.. but i want on allow acces and only when acces test.php.. if is necesary guys. tell me and i give you the code for denny ip
I hope guys you can understand my problem.. is not hard what i ask but i dont know guys how to put this to work..
PS; localhost is just a example i have a domain. and i want to help me guys with the code on .httaces and maybe if is necesary on test.php
I use apache2 on ubuntu 14 and ubuntu 16
Upvotes: 0
Views: 90
Reputation: 98
You can try this way in .htaccess
order deny,allow
deny from all
allow from <ip to access permited> //allow from 255.0.0.0
Upvotes: 1