I have a (Wordpress powered) website, and Google is indexing some of the sub-directories. How can I stop Apache from showing users the directory listing? I know I can edit .htaccess to password-protect a directory, but I would prefer a 403 / custom redirect if possible.
views:
308answers:
3
+3
A:
Look at your robots.txt rules, and make sure apache is not serving-up directory listings.
see http://httpd.apache.org/docs/2.0/howto/htaccess.html && http://www.webmasterworld.com/forum92/5272.htm
warren
2008-10-08 20:46:50
A:
Don't know much about Apache but you should do a 404 instead of a 403 if you can because a 403 tells someone that they may have found something interesting.
Flory
2008-10-08 20:49:16
You're suggesting that people use an incorrect error code to avoid people thinking they're not allowed to access something that they can't access? What? Moreover, the mediocre security-by-obscurity you're suggesting could also be achieved by correctly returning a 403 where disallowed and not found.
eyelidlessness
2008-10-10 23:13:57