Forum Moderators: open

Message Too Old, No Replies

Hiding file extensions

hide unpublished content held on web site server

         

rightroyalkneesup

11:15 pm on Feb 4, 2007 (gmt 0)

10+ Year Member



Hi, first off I should say that I'm no expert at web development but have managed to hobble together a site that works for our business but as a user clicking on a link can clearly see it's path in the address bar i.e. www.mysite.com/adirectory/thepagetheywant.html it means that if someone now enters - www.mysite.com/adirectory in the address bar, every file and folder in that directory is now displayed.
We're not the FBI or anything but would prefer not to allow access to the unpublished content held on our website server, is there anything we can do to hide this information?
I have seen some suggestions regarding framesets and hiding urls but I'm not too familiar with frameset use and in any case would prefer that visitors could see where they were being taken. Is there some code I could insert to hide this unpublished content yet still allow visitors to see where they're going, or am I asking too much?
Cheers

encyclo

11:29 pm on Feb 4, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld rightroyalkneesup! You don't need frames at all, the file listing is only shown if there isn't a default index file in each directory. So all you have to do is upload a file called index.html into each directory, and even if it is blank it will stop the file listing occuring.

You can also disable the file listing if your server is running Apache (ask your system administrator if you're not sure), by adding the following to a .htaccess file in your document root.

Options -Indexes

Hope that helps. :)

rightroyalkneesup

12:13 am on Feb 5, 2007 (gmt 0)

10+ Year Member



thanks for the welcome and the advice encyclo! will go do it now, I won't even ask how that works...
thanks again