Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8377385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:39:33+00:00 2026-06-09T15:39:33+00:00

Through researching, I discovered two common techniques to prevent clients from accessing libraries directly

  • 0

Through researching, I discovered two common techniques to prevent clients from accessing libraries directly with a browser:

  1. Use .htaccess to keep them out
  2. Define a constant and pass it to included files, included files then checks if the constant exists.

However, just keeping those files out of the document root seems sensible. Is there anything wrong with this approach?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T15:39:35+00:00Added an answer on June 9, 2026 at 3:39 pm

    The best thing to do is keep it outside of your docroot. There is no reason to put includes in a directly HTTP-accessible place.

    Some shared web hosts are poorly configured and don’t have this option, but most do, and you definitely have this choice on your own server or VPS.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Through a bit of digging, I've discovered how to set and get the volume
I'm researching a solution for a client, where they receive orders through email. I
I noticed an interesting result from JSLint while researching a codereview question. JSLint complained
I'm researching ways to perform bulk geocoding through http request, and get the response
I have been researching switching my allocation method from simpling overloading new to using
Today while researching for a project I was looking through the docs for Dictionary<TKey,
I discovered twisted half-way through developing a network application. I had a working Client
I'm researching Umbraco for use as a base in a large CMS project ,
So I've been on the whole researching techniques for better architecture and run time
I've done lots of reading and researching on webservice and consuming them from a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.