Problem with . htaccess, subdomain

Asked

Viewed 507 times

2

I have on my site (root) a Windows installation, IE, in the public_html folder I have a file . htaccess 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 what little I know about htaccess, I think it’s causing the 'public' to disappear and be replaced by whatever comes next. So far so good. The problem arises when I have another app in a domain name of this domain, it should not be relevant but this is not Laravel, is the simplest html/css/js done from scratch, appears error 500, Internal server error. But if I remove the . htaccess above root no longer happens, and it appears all right, but with the problem of accessing the main site you have to write site_principal.com/public/ (my installation Laravel).

Below is a photo of the link structure.

inserir a descrição da imagem aqui

1 answer

2

In Laravel root folder, creates a . htaccess file with this code:

Add these two lines in the . htaccess folder public_html

RewriteEngine On

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

RewriteRule ^(.*)$ public/$1 [L]
  • What about the root folder of the domain? I have to do something? In the public folder of the domain I already have it, by the way it comes by default

  • She doesn’t need to have . htaccess if I understand what you said...

  • Exact also thought not, but it gives error 500

  • Edit the question and place an FTP image or 'draw' the directory tree.

  • Edited the question

  • I edited the answer.

  • I’m sorry, but now there’s an error in both root and subdomain. That’s all my htaccess has to say, these 4 lines

Show 2 more comments

Browser other questions tagged

You are not signed in. Login or sign up in order to post.