Release access to folders in .htaccess

1

First of all I want to say that I have already researched here on the stack and none of the examples helped me. But if you think it is duplicate please indicate the solution link.

I have set up a .htaccess application for ZEND 1.12 in an application

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

Then when accessing a link from an image it gives the error saying that the controller is invalid. Because the url sequence is / controller / action / param / 123

Ex:

http://localhost:85/img/catalog/paisagem.jpg4

I know that this is due to the fact that I was not released to access the IMG / CATALOG folder in .htaccess I tried to do some examples and none worked, one that tried worked, showed the image but zend was not configured to normally access it I had to go back and put the same code above for the site to work again.

Any suggestions?

    
asked by anonymous 28.04.2015 / 18:38

1 answer

2
  

Believe that I was working with a framework and I had this same problem within 2 hours, rs

If I followed up on what you asked, so that the informed folder is not affected by mod_rewrite you must add a new .htaccess inside the img folder, for example, what should be the content of .htaccess :

<IfModule mod_rewrite.c>
RewriteEngine Off
</IfModule>

Example of a folder structure:

.
├── img
|   ├── .htaccess (arquivo para liberar acesso desta pasta)
|   └── catalog
|       └── paisagem.jpg4
├── .htaccess (arquivo usado pelo zend)
└── index.php
    
28.04.2015 / 19:56