How to read images from a folder with htaccess file

wedmynow

New Member
I am using the readfile function to read image files. It works in most cases except when an image is located in a directory with htaccess file.Here is an example:\[code\]header("Content-type: image/jpeg");ob_clean(); // clean output bufferflush(); // flush output buffer readfile("http://127.0.0.1/WebProjects/project1/data/media/images/original/7.jpg");exit;\[/code\]The htaccess is located in the http://127.0.0.1/WebProjects/project1/ directory and looks like this:\[code\]RewriteEngine OnRewriteRule ^\.htaccess$ - [F]RewriteCond %{REQUEST_URI} =""RewriteRule ^.*$ /public/index.php [NC,L]RewriteCond %{REQUEST_URI} !^/public/.*$RewriteRule ^(.*)$ /public/$1RewriteCond %{REQUEST_FILENAME} -fRewriteRule ^.*$ - [NC,L]RewriteRule ^public/.*$ /public/index.php [NC,L]\[/code\]Any way how to get around this? The htaccess file must be there because the web application in that folder needs it to work.
 
Back
Top