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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:46:59+00:00 2026-05-13T08:46:59+00:00

For security purposes, all system, images documents are located outside my website root directory.

  • 0

For security purposes, all system, images documents are located outside my website root directory. I don’t want to use relative paths because some files are called in difference circumstances, and sometimes they are included inside other files.

I’m looking for an infallible solution to allow me to maintain my system files outside my root directory and access them with absolute paths.

Please read this elaborate explanation:

If I have a page called: “index.php“, it would be located inside the directory “root” (thus accessible to everybody).
This “index.php” would contain a <img src="..." /> to an image file outside the root, in an adjacent directory to “root“, called “images“. Sure I could use src="../images/goody.jpeg" but if I included "index.php"‘s contents in another file, located elsewhere, this would fall short at getting to "goody.jpeg".

So after badgering about paths, could you help me complete this one:

<img src="?

Thank you!

  • 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-13T08:47:00+00:00Added an answer on May 13, 2026 at 8:47 am

    You cannot publicly reference files outside of the public root. That is the whole point of the public root. If ../images/img.jpg works and images/img.jpg is outside of your public root, you have a security issue. The whole point of a public root is to sandbox the public into a confined area of your server. What you are trying to do is allow users to break out of that sandbox.

    All public assets (images, css, javascript, etc) should be in the public root or a sub directory under it.

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

Sidebar

Related Questions

For security purposes, I want to stop the users from being able to view
For security purposes i am droping all the server roles from each login in
I have some pages that are stored in databases. For security purposes, all the
I have files stored outside the public_html folder for security purposes. However, I would
We need to protect a class from having static methods for security purposes. We
The security policy at our client's production environment requires that we use separate connection
We're considering an authentication system for a very temporary website that needs to authenticate
I am architecting a solution that will use WCF to make all the computers
This question is mainly for security purposes. I need to know if it is
For security reasons, several articles recommend do not cache pages. So I usually put

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.