E
E
ermilovroman2015-07-17 00:07:35
PHP
ermilovroman, 2015-07-17 00:07:35

How to redirect from http to https for all but one page?

How to redirect from http to https for all but one page?

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</IfModule>

# END WordPress

Page that should be without https : site.com/play

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
ShamblerR, 2015-07-17
@ShamblerR

RewriteCond %{REQUEST_URI} !$ваш_урл1$  [NC,OR]
RewriteCond %{REQUEST_URI} !$ваш_урл2$  [NC,OR]
RewriteCond %{REQUEST_URI} !$ваш_урл3$  [NC,OR]
RewriteCond %{REQUEST_URI} !$ваш_урл4$  [NC]
# Последний без OR поскольку нет следующего или просто NC
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