HTACCESS - Directory exclusion condition

2

Good evening!

I have the following scenario in an application:

I'm redirecting all requests to my index.php and handling URL's through the application:

    RewriteCond %{REQUEST_URI} !admin
    RewriteCond %{REQUEST_URI} !\.(gif|jpg|png|css|js|etc|flv|swf|mp4|mov|ttf)$ [NC]
    RewriteRule (^.*) index.php [L]

I'm terrible with regular expressions, until today I did not understand this alien language, but I need a lot to solve this problem. All my frontoffice is prepared for Friendly URL, but the admin did not, so I needed this rule not to apply to the admin directory. When I send parameters to / admin /? Area = Login, for example, it works. If I just type / admin / apache applies the rule. If I pass a parameter that is via GET apache does not apply.

Thank you in advance, Renan Mazo

    
asked by anonymous 21.12.2015 / 02:30

1 answer

2

Add an .htaccess file to the / admin /

In this file, just put the command to disable mod_rewrite:

RewriteEngine off
    
21.12.2015 / 07:29