D
D
deleted-mezhevikin2015-04-20 13:46:46
Apache HTTP Server
deleted-mezhevikin, 2015-04-20 13:46:46

How to redirect from http to https in mamp pro?

I am currently developing the site on the local mamp pro server, the site itself is on laravel 5.
I configured the host to work via https, but now a white page is returned via http, how to redirect from http to https?
The original .htaccess looks like this:

<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews
    </IfModule>

    RewriteEngine On

    # Redirect Trailing Slashes...
    RewriteRule ^(.*)/$ /$1 [L,R=301]

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]

</IfModule>

SetOutputFilter DEFLATE

Tried adding:
RewriteCond %{HTTPS} !=on
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [NC,R=301,L]

Did not work

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Michael, 2015-04-21
@Remdev

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question