Options +FollowSymLinks IndexIgnore */* RewriteEngine on RewriteCond %{REQUEST_URI} !^/(frontend) RewriteCond %{REQUEST_URI} !^/(backend) RewriteRule ^css/(.*)$ frontend/css/$1 [L] RewriteRule ^js/(.*)$ frontend/js/$1 [L] RewriteRule ^img/(.*)$ frontend/img/$1 [L] RewriteRule ^fonts/(.*)$ frontend/fonts/$1 [L] RewriteRule ^audio/(.*)$ frontend/audio/$1 [L] RewriteRule ^en/(.*)$ frontend/$1 [L] RewriteRule (.*) /frontend/$1 RewriteCond %{REQUEST_URI} !^/(frontend) RewriteCond %{REQUEST_URI} !^/(backend) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /frontend/index.php RewriteCond %{REQUEST_URI} ^/(backend) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /backend/index.php Here is such an htaccess. When you go through the domain - goes to the frontend, everything is ok. And when you click on the link / backend /, it goes to the backend, ok. But there is still a moment, this folder is there! although even if you re-name it and rewrite htaccess under another folder, everything works.
but something around the waters / backend / login / - no longer works
.htaccess backend-a
AddDefaultCharset utf8 Options -Indexes DirectoryIndex index.php RewriteEngine On RewriteBase / RewriteRule ^\.htaccess$ - [F,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . index.php RewriteCond %{REQUEST_URI} !/$ RewriteCond %{REQUEST_URI} !\. RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L] ErrorDocument 404 /404