Answer the question
In order to leave comments, you need to log in
How to change htaccess to https?
I installed Laravel, but I have it at domen.ru/rest/public. How can I remove /public ?
Here is my htaccess
RewriteEngine on
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
Answer the question
In order to leave comments, you need to log in
Oh and screwed up. More or less like this:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
RewriteCond %{REQUEST_URI} !^rest/public
RewriteRule ^(.*)$ rest/public/$1 [L]
</IfModule>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question