RewriteEngine On
# force https for all URLs in /meu-carrinho
RewriteCond %{HTTPS} =off
RewriteRule ^meu-carrinho https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
# force http for all other URLs that are not in /meu-carrinho
RewriteCond %{HTTPS} =on
RewriteCond %{REQUEST_URI} !^/(meu-carrinho|index.php/meu-carrinho)
RewriteRule .* http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
# Exclude some directories from URI rewriting
#RewriteRule ^(dir1|dir2|dir3) - [L]
RewriteRule ^.htaccess$ - [F]
RewriteCond %{REQUEST_URI} =""
RewriteRule ^.*$ /public/index.php [NC,L]
RewriteCond %{REQUEST_URI} !^/public/.*$
RewriteRule ^(.*)$ /public/$1
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^.*$ - [NC,L]
RewriteRule ^public/.*$ /public/index.php [NC,L]