N
N
Nikita Tratorov2015-12-06 20:13:32
Apache HTTP Server
Nikita Tratorov, 2015-12-06 20:13:32

Why doesn't address exclusion from classic redirect to HTTPS work?

In my .htaccess there is a classic HTTPS redirect block,
I add two addresses to it that I want to open both via http:// and via https://
but the following entry does not work, i.e. always redirects to https

...
RewriteCond %{REQUEST_URI} !^\/rss.*$
RewriteCond %{REQUEST_URI} !^\/yrss.*$
RewriteCond %{HTTPS} !=on
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
...

Tell me what is the reason.

Example:
enter
site.com/rss
expect
site.com/rss
get
https://site.com/rss

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question