I have an includes directory that I want to protect. I can easily deny access in .htacess but this returns an error 403 - no one can get in but they know it is there. Detecting the presence of a suitably named directory could reveal the underlying architecture and make the site vulnerable to known bugs and vulnerabilities with it. By instead returning an error 404 message anyone trying to break in would stop that line of attack and move on.
That is the hypothetical situation I am wishing to potentially avoid anyway. But how can I do this?
The only solution I can think of is have each of the include files (which are php) include code to detect when they are being loaded and if so return the 404 status themselves. This seems rather messy though. Is there anything I can add in .htaccess to instead simulate this effect?
Thanks,
Michael.


LinkBack URL
About LinkBacks



Reply With Quote
) care to tell me what the secret phrases are?
Bookmarks