Problem with .htaccess, subdomain

2

I have a large installation on my site (root), that is, in the public_html folder I have a .htaccess file with:

<IfModule mod_deflate.c>
    <FilesMatch "\.(html|php|txt|xml|js|css)$">
        SetOutputFilter DEFLATE
    </FilesMatch>
</IfModule>

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_URI} !^public
    RewriteRule ^(.*)$ /public/$1 [L]
</IfModule>

From the little I notice from htaccess, I think this is causing 'public' to disappear and be replaced by whatever comes next. So far so good. The problem comes up when I have another app in a subdomain of this domain, it should not be relevant but this is not laravel, it is the simplest html / css / js done from root, error 500, internal server error appears. But if I remove the above .htaccess root already does not happen, and everything looks fine, but with the problem of to access the main site you have to write site_principal.com/public/ (my laravel installation).

Below is a photo of the link structure.

    
asked by anonymous 21.03.2016 / 13:50

1 answer

2

In the root folder of Laravel, create an .htaccess file with this code:

Add these two lines in the .htaccess of the public_html folder

RewriteEngine On

RewriteCond %{HTTP_HOST} ^(www\.)?claradvl\.com$ [NC]
RewriteRule ^/?(index.\php)?$ /fitkick [L]

RewriteRule ^(.*)$ public/$1 [L]
    
21.03.2016 / 13:54