Acces image file outside the web folder

Hi,

This is my apache config for my site:

DirectoryIndex index.php

DocumentRoot /var/www/mysite/web/

This is my .htaccess located in /var/www/mysite/web/

RewriteEngine On

If a directory or a file exists, use the request directly

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

Otherwise forward the request to index.php

RewriteRule . index.php

I want to access images that are located into /var/www/assets/media/STORE with:

<img name="img01" src="/mysite/assets/media/STORE/204a5dcf92feaf9403c42890bf5d8d2c/Res_640x480/20141018-RV7_2269.jpg">

Locally on my mac, no problem.

But externally it doesn’t work.

Any idea?

oups I’ve make an mistake

I want to access images that are located into /var/www/mysite/assets/media/STORE with

Hi,

try with an Alias


Alias /mysite/assets/media/STORE/ "/var/www/mysite/assets/media/STORE/"

thanks torejx for your suggestion, but it doesn’t work.

May be an apache settings …