Url Amigavel .htaccess with problem

0

I have the following .htaccess file:

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

ErrorDocument 404 /erro404
RewriteRule ^(.*)$ index.php?rota=$1 [L,QSA]

I'm trying to put a condition that when the user enters the page site.com/editor it go to the / editor folder instead of the index. I tried the following unsuccessful way:

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

ErrorDocument 404 /erro404
RewriteRule editor /editor/index.php
RewriteRule ^(.*)$ index.php?rota=$1 [L,QSA]
    
asked by anonymous 22.03.2015 / 05:49

1 answer

0

The [L] flag is missing, thus:

RewriteRule editor /editor/index.php [L]

This flag means "last". That is, if the rule matches, it will not check the others. Apache processes these rules as if it were a switch of a programming language and the [L] flag functions as if it were break .

    
02.04.2015 / 16:01