P
P
pikla2017-02-14 15:27:32
htaccess
pikla, 2017-02-14 15:27:32

How to redirect HTTPS to HTTP for only one page?

There is a site that is fully converted to
https using commands in
.htaccess //%1/$1 [R=301,L] #Redirect from http to https RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI } [L,R=301 ] Now all pages work on https protocol. But I only need to make site.ru/page1 for only one single page so that when I go, it automatically has the HTTP protocol?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Taran, 2017-02-15
@shambler81

RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} ^/page1$
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

So what's the problem?
Adding another cond

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question