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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:03:46+00:00 2026-05-22T18:03:46+00:00

More specifically, I have an htaccess file that restricts anyone from seeing the directory

  • 0

More specifically, I have an htaccess file that restricts anyone from seeing the directory contents. Such that, nobody can see my 1000s of images in http://www.example.com/images by using:

deny from all
allow from 127.0.0.1

However, I want to use these images on http://www.example.com such that,
<img src="images/thisimg.jpg" /> works.

I hope I’m in the right direction, but I appreciate any insight/re-direct. This is similar to: How to protect all directory contents, but gain access to php script but I want to link to these images in that directory, and using deny from all does not allow me to do that.

Thanks in advance for your help.

  • 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-05-22T18:03:47+00:00Added an answer on May 22, 2026 at 6:03 pm

    All you need to keep people from seeing the directory contents is an index.php or .html file in that folder. Any requests for yoursite.com/images will load index.php, which you’ll set to a dummy page.

    index.html could be something like:

    <html><title>Forbidden!</title><body>Nothing to see here...</body></html>
    

    or a redirect script index.php:

    <?php header('Location: /index.php'); exit(); ?>
    

    Don’t use .htaccess for blocking directory listings, it blocks access to everything.

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

Sidebar

Related Questions

Or at least the part of it, that makes sense. More specifically I have
http://developer.yahoo.com/yui/button More specifically, I want radio buttons. that can be checked/unchecked.
More specifically making HTML, Java, and python more readable? Does anyone have suggestions for
I have an information system, more specifically an information system that is a ticketing
Problem: I have a servlet that generate reports, more specifically the table body of
I have a question concerning encryption, more specifically encryption that requires no internet connection
I have been hearing about streams, more specifically file streams. So what are they?
I have three C# methods that almost perform identically. More specifically there is a
Is it possible to have a class inheriting from a struct? More specifically, how
More specifically, I have a right sidebar that spans the right side of the

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.