Redirect - Friendly URL .HTACCESS

1

I created a redirect from a domain to a subfolder, see how it went:

# Redirect from www to non-www location
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.meusite.com.br [NC]
RewriteRule ^(.*)$ https://www.meusite.com.br/loja/$1 [R=301,L]

It worked perfectly!

The problem is that I need to access another subfolder, which is www.meusite.com.br/administrar , but when I log in I'm redirected to www.meusite.com.br/loja/administrar

Any suggestions?

    
asked by anonymous 15.09.2015 / 16:42

1 answer

0

I've got a solution, see below:

# REDIRECT LOJA
<ifmodule mod_rewrite.c>
 RewriteEngine on
 RewriteCond %{REQUEST_URI} !^/administrar/ [NC]
 RewriteRule (.*) http://meusite.com.br/loja/ [R=301,L] 
</ifmodule>
    
15.09.2015 / 19:35