.htacces file. Can I block access to a directory without blocking access to the files within it?

Posted by steph on Stack Overflow See other posts from Stack Overflow or by steph
Published on 2010-03-17T17:37:48Z Indexed on 2010/03/17 17:41 UTC
Read the original article Hit count: 379

Filed under:
|
|

I'm building a website, but I'm not entirely sure what to do with the .htaccess file. Say for example I have a folder called pages which holds all my pages, can i deny access to someone if they type in www.website.com/pages so that they can't see the directory? I've tried putting the .htaccess file in the pages folder with the "deny from all" line and although it denies access, it's also denying access to the actual pages. Is there a way to do this without denying access to see the pages on the website, just denying access to the directory?

Sorry if this doesn't make much sense, I'm so confused lol. Thanks for any help.

© Stack Overflow or respective owner

Related posts about .htaccess

Related posts about website