Answer the question
In order to leave comments, you need to log in
How to make an https redirect exception for one page?
Please tell me how to set up a redirect. The whole site works on https, but I need to leave the http protocol for one page!
The admin set up and does not get in touch!
In .htaccess I have the following
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
#del www
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
#del //
RewriteCond %{REQUEST_URI} ^(.*)/{2,}(.*)$
RewriteRule (.*) %1/%2 [R=301,L]
#add /
RewriteCond %{REQUEST_URI} ^(.*/[^/\.]+)$
RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !/bitrix/urlrewrite.php$
RewriteRule ^(.*)$ /bitrix/urlrewrite.php [L]
RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]
</IfModule>
Answer the question
In order to leave comments, you need to log in
there is no redirect to https
but it can be elsewhere
1. redirect to nginx
2. redirect to apache
3 settings of https itself, you can specify automatic redirect to https there
like this
add_header Content-Security-Policy-Report-Only "default-src https:; script-src https: 'unsafe-eval' 'unsafe-inline'; style-src https: 'unsafe-inline'; img-src https: dat a:; font-src https: dat a:; report-uri /csp-report";
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question