EmmonsNet

Geek Stuff

Home Blog Rants When will 'webmasters' learn what the .htaccess file is for?
When will 'webmasters' learn what the .htaccess file is for? PDF Print E-mail
Written by Frank Emmons   
Friday, 31 July 2009 12:06

Apache LogoI got a call a few minutes ago from a self titled 'webmaster' asking me why all of his directory indexes on his website showing in Google search results. I did a search on Google for 'site:<his domain name> "index of"' and sure enough, I received a bunch of links that I could click on and then start navigating his sites directory structure.

I called him back asking him to send me a copy of his .htaccess file to look over. His response 'My H-T What?!?!'.

Oh brother.

He could have avoided having his sites internals laid naked before the web browsing and Google snooping world easily by doing the following.

Create a default index.html in every directory of his website. Make sure a .htaccess file is present .. if not create it. Add the following two lines to the .htaccess file:

DirectoryIndex index.html
Options All -Indexes

What else could have done?

I don't know ... maybe RTFM!

 

Last Updated on Friday, 31 July 2009 12:41
 
Share/Save/Bookmark