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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:49:05+00:00 2026-05-27T22:49:05+00:00

Images are served from a folder outside Apache’s public folder and Aliases are not

  • 0

Images are served from a folder outside Apache’s public folder and Aliases are not wanted.

What is the keyword, if existing, to get the real path of the htaccess that contains the rewriting rules ?

# /website1.com/public/prod/ --> index.php & .htaccess
# /website1.com/assets/images/

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteRule ^images/(.*)$ REALPATH/../../assets/images/$1 [L] 
# REALPATH doesn't work of course

# not wanted :
# RewriteRule ^images/(.*)$ /website1.com/public/prod/assets/images/$1 [L] 
  • 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-27T22:49:06+00:00Added an answer on May 27, 2026 at 10:49 pm

    You can’t access files outside of .htaccess directory, even using absolute path. Solution could be to make symbolic link in current folder that points to your images directory and then point your .htaccess rule to this file.

    Your rule then should look like this:

    RewriteRule ^images/(.*)$ /assets/images/$1 [L] #this is relative to your .htaccess file
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can i use Tomcat to serve image files from a public folder outside
i used ftp-get function to download images from server. But by accident i used
I'm trying to retrieve images from a folder using glob() and i want it
I am using a function Rename() (php) to move some images from one folder
I want to load images from a folder located on my server eg. webimages
I need to grab a some images from a folder on a users computer
How to access and display the images that are located outside the application folder?
I have problem with loading images from the Documents folder of iPhone application into
I'm trying to load images from a relative folder /media/one.jpg but it never loads,
I have some images in a folder save automatically from a web camera naming

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.