image does not appear by rule in . htaccess

Asked

Viewed 142 times

2

I have my .htaccess in the form below:

<IfModule mod_rewrite.c>

    RewriteEngine on 
    RewriteCond %{REQUEST_FILENAME} -s [OR] 
    RewriteCond %{REQUEST_FILENAME} -t [OR] 
    RewriteCond %{REQUEST_FILENAME} -d 
    RewriteRule ^.$ - [NC,L] 
    RewriteRule ^(.*)$ index.php?/$1 [L]

    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?localhost/mvc [NC]
    RewriteRule \.(jpg|jpeg|png|gif)$ - [NC,F,L]

    ErrorDocument 400 http://localhost/mvc/400.php
    ErrorDocument 401 http://localhost/mvc/401.php
    ErrorDocument 403 http://localhost/mvc/403.php
    ErrorDocument 404 http://localhost/mvc/404.php
    ErrorDocument 500 http://localhost/mvc/500.php

</IfModule>

php_value allow_url_fopen on
php_value allow_url_include on
php_flag mail_filter 0

As it stands, and I believe problem be here:

RewriteRule ^.$ - [NC,L] 
RewriteRule ^(.*)$ index.php?/$1 [L]

Not I’m getting to show off imagens for all link need to go through the page first index.php for rule that I’m wearing.

I tried to put the absolute path image but also not solved.

My objects in this .htaccess sane:

1) All requisição necessarily arrive at the index php.

2) That the imagens appear normally (NAY is error of link because when disabled in .htaccess the above two lines to imagem appears in the browser.)

3) Do you have how to optimize this .htaccess?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.