N
N
Nicol212016-04-24 22:00:34
htaccess
Nicol21, 2016-04-24 22:00:34

How to set up a redirect from https to http via .htaccess?

Hello, I can’t redirect from https to http via .htaccess
In the opposite direction with this code it works

  • Rewrite Engine On
  • RewriteCond %{HTTPS}=off
  • RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [QSA,L]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Novikov, 2016-04-24
@Nicol21

RewriteCond %{HTTPS} on
RewriteRule (.*) http://...

Faster way via virtualhost:
<VirtualHost *:443>
ServerName ...

Redirect permanent http://...
</VirtualHost >

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question