How to deny access to a directory?

Asked by:
HubFans / n/a Points
Time:
2014-12-13 5:13 am EST
Category:
Website
Hits:
61
I have a directory that should not be accessed directly. Can I prevent direct access without affecting the ability of pages on my site to call files in that directory?

To ask this user for more information, please first login.

To submit an answer, please login.

ANSWERS

0

JeffMa
Staff
2,342 Points
2014-12-13 5:16 am EST
If you place a .htaccess file inside the directory with the following, you will be able to call files from it within your code, but cannot be accessed by a user:

deny from all

To submit a comment on this answer, please first login.

Want to share this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Need More Help?

Help Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.
}