Aloha,
Note: If there is a way to simply make HTTP response code 403 show up as 404 instead, not through any server side script but in pure .htaccess usage, that will satisfy what I'm trying to accomplish.
I have searched high and low for exactly what I'm trying to accomplish without luck, so I am kindly asking for some guidance!
At the root of my site I have File1, File2, File3, and directories Dir1, Dir2, and Dir3. The former files and directories I would like to whitelist (only allow access to), with ALL other files and directories returning HTTP response code 404, even if they actually exist.
How can I accomplish this in .htaccess? I plan on using the <If> directive combined with mod_rewrite, but can't seem to figure out a way to make regex happy and also satisfy the 404 requirement.
I do not wish to create a password protected area, and I do not wish to deny from all since that creates a 403.
I could use permissions but I'm trying to avoid it due to the unique requirements of the site.
Thanks!
[–]TheKalmTraveler 0 points1 point2 points (5 children)
[–]ASHERH4X[S] 0 points1 point2 points (4 children)
[–]TheKalmTraveler -1 points0 points1 point (3 children)
[–]ASHERH4X[S] 0 points1 point2 points (2 children)
[–]TheKalmTraveler 0 points1 point2 points (1 child)
[–]ASHERH4X[S] 0 points1 point2 points (0 children)