D
D
dev_n2016-05-22 15:54:47
htaccess
dev_n, 2016-05-22 15:54:47

How to set up a redirect to https?

Good afternoon.
I have this redirect

# Redirect all requests to index.php
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?route=$1 [L,QSA]

If not file, redirect the request to the index.php page in the route parameter

Task. Add a redirect to https here :)
I tried it myself. separately without a redirect above it turned out. But as soon as I tried to add the above rules, everything collapsed)
thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Maltsev, 2016-05-22
@Beloborod


Redirect / https://domain.ru/
is in the apache config, which you access when requesting a site via http (in the /etc/apache2/sites-enabled folder)
, respectively, you must have a config for an https request to the site as well as installed support for SSL on the server

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question