T
T
thisall2020-12-14 23:32:32
htaccess
thisall, 2020-12-14 23:32:32

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

1 answer(s)
N
Nixtone, 2020-12-15
@Nixtone

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 question

Ask a Question

731 491 924 answers to any question