.htaccess does not allow entering folders

1

I have a website in CakePHP and its correct htaccess correctly. The problem occurs because I created an additional domain in the hosting and as usual, it creates a folder in public_html to put the files of this new domain getting for example public_html/dominio2 . I played all the files there, from the other site, only because of htaccess, when I enter www.domain2.com it returns me erro 500 . If I rename the .htaccess of the Cake root, then it goes into dominio2.com.br , but the cake files are all messed up. The htaccess I have today

htaccess

<IfModule mod_rewrite.c>
   RewriteEngine on
   RewriteRule    ^$ app/webroot/    [L]
   RewriteRule    (.*) app/webroot/$1 [L]
</IfModule>

What can I put there for if the request is for a folder, then it goes into the folder and does not pass the webroot?

    
asked by anonymous 29.05.2015 / 20:19

1 answer

0

You need to add a condition to .htaccess:

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^dominio1.com.br$ [NC]
    RewriteRule    ^$ app/webroot/    [L]
    RewriteRule    (.*) app/webroot/$1 [L]
</IfModule>

That way, when you enter domain2.com , it will not read the .htaccess RewriteRule from domain1 .

    
01.06.2015 / 15:47