Using a front controller design pattern doesn't allow images to be served

Posted by MrMe TumbsUp on Pro Webmasters See other posts from Pro Webmasters or by MrMe TumbsUp
Published on 2014-01-20T19:50:17Z Indexed on 2014/08/18 16:46 UTC
Read the original article Hit count: 272

Filed under:
|
|

I am currently using a front controller. All requests for my website go through it. I have a problem with image links like:

<img src="img/image.jpg" />

Then my front controller will try to dispatch the request to: application/controller/ImgController.php. Then the image won't load. I think it has something to do with the .htaccess file:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]

© Pro Webmasters or respective owner

Related posts about php

Related posts about htaccess