HTACCESS - External File [closed]

0

I have a .htaccess file, but if I have a file outside the folder, it will not allow me access ... And I would like to allow:

RewriteEngine on
RewriteCond $1 !^(index\.php|site|assets|fonts|images|css|js|administrar|entrada|docs|system)
RewriteRule ^(.*)$ index.php/$1 [L]

This file is in the root, where the file I want to display is also, so that I can display I have to remove htaccess, but I need it to manage the administrator.

Edition: This file is in the root of the site, and I needed the root of the site to have a php file, any name ... and because of that I did not access it. But it worked. And I posted the answer.

    
asked by anonymous 26.07.2015 / 03:32

2 answers

0

I worked as follows and it worked!

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
    
26.07.2015 / 03:51
0

Add the following entry in your .htaccess to allow access to the file arquivoPermitido.php

Order deny,allow
Deny from all

<Files "arquivoPermitido.php">
   Allow from all
</Files>
    
26.07.2015 / 03:37