Codeigniter deny access to directory of controllers with apache config
Posted
by
MAZUMA
on Stack Overflow
See other posts from Stack Overflow
or by MAZUMA
Published on 2012-12-05T23:02:36Z
Indexed on
2012/12/05
23:03 UTC
Read the original article
Hit count: 197
I’d like to restrict access to a folder of controllers that are used for admin purposes only. I’ve tried a number of ways and not coming up with a solution. These controllers are behind password protection. But, I’d like to just remove it from view if someone happens to stumble upon the right directory. Can this be done? I’d rather not do it from htaccess. I have access to the apache config files, so I’d like to handle it there.
Does it have anything to do with the way Codeigniter routes? Or, am I just way off?
This what I’m using that doesn’t work
<Directory /var/www/application/controllers/folder/>
Order deny,allow
Deny from all
Allow from xxx.xxx.xxx.xxx
</Directory>
© Stack Overflow or respective owner