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 7999957
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:39:12+00:00 2026-06-04T15:39:12+00:00

I am currently on a shared host and my files and folders are placed

  • 0

I am currently on a shared host and my files and folders are placed inside “public_html”. In this, I have a folder that consists more folders inside it along with many pdf files. So the folder looks like this:

FOLDER/folder1/xyz.pdf

FOLDER/folder2/abc.pdf

etc..etc..

I am trying to figure out a way to deny access to the folder directly through a browser but not deny access to the files in it. At the moment, when someone goes to my site as http://www.mysite.com/FOLDER, you can access the folder and see its contents through a browser itself. But I dont want to deny complete access to the folder since I have links to its pdf files in some of other pages on my site like: Click here

Can someone guide me on I can restrict the direct access to the folder but not deny access to its files plz?

EDIT:
I am thinking, do I just create an index.html file in every folder?

  • 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-04T15:39:14+00:00Added an answer on June 4, 2026 at 3:39 pm

    I would suggest using htaccess and adding the IndexIgnore command:

    IndexIgnore *

    Put it in a file and call it .htaccess (Not .htacces.txt, only .htaccess)

    Another option is to prevent only one kind of file from being indexed:

    IndexIgnore *.pdf

    You can ignore any file type: ” *.pdf *.zip *.jpg *.png *.html(bad idea! 😛 )”

    I hope this helps 🙂

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

Sidebar

Related Questions

I am currently facing a rather limited shared web host that I have to
I have a database that is currently sharded. This is the first time that
I'm currently trying to have my 1and1 host an .htaccess file with mod_rewrite enabled,
Currently I have a bit of a 'different' set-up. My main files are on
I'm kind of stuck with this problem. I am currently trying to host a
I have a personal website with a MediaWiki installation on a shared host. The
I currently have a very large site approximately 5gb in size with 60,000 files.
I currently have more than 1000 visits / day and hosting at 1and1 with
I am currently on a shared hosting plan with iis 7.0 I have an
I am developing a php mysql app that is currently on a shared server

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.