jeudi 2 avril 2015

Restrict access to all folders but one to local ips using .htaccess

I just set up a web server and I'm having some trouble configuring my .htaccess to apply the restrictions I want.


Basically, I want everything on /var/www to be restricted to local ips but one folder, that should be publicly accessed. This is what I currently have in my .htaccess (located at /var/www/.htaccess) and it seems to be doing the opposite or something:



//Deny access to all directorys but 'pepephone'
<Directory /var/www>
Order deny,allow
deny from all
allow from 192.168.0.
<Directory /var/www/pepephone>
Order allow,deny
allow from all
<Directory>
<Directory>


What do I need to change to achive the result I want? Thanks in advance.





Aucun commentaire:

Enregistrer un commentaire