Welcome! Log In Create A New Profile


How to disable https for specific URL?

Posted by velik505 
How to disable https for specific URL?
November 23, 2016 12:42AM
It is necessary to disable https url for these types:
/ Mailview? .....
/ Msd? ....
/ Separator? ....
That they worked for http. Now there is a common glue works on http or https is necessary kerf https for the entire site except for 3 url:
listen xxx.xxx.xxx.xx: 443 ssl http2;
If no Strict-Transport-Security to do so:
if ($ scheme = http) {
rewrite ^ https: // $ http_host $ request_uri? permanent;

Is it possible to like it here shove the 3 URL to this rule was not working?
In interenete I googled hour nothing like nowhere on stekoverflov etc. and etc.
Re: How to disable https for specific URL?
November 23, 2016 02:42AM
Example from nginx for Windows documentation, chapter 9.

http {
map $request_uri $requri {
default 1;
/ 0;
server {
listen 80;
server_name www.mydomain.eu;
root '/webroot/www.mydomain.eu’;
if ($requri) { return 301 https://www.mydomain.eu$request_uri; }
location / {
try_files $uri $uri/ =404;
index index.html index.htm;

This will allow you to keep root access via plain HTTP but redirect everything else to HTTPS.

You will need to adjust it for your purpose but the idea behind it will work for what you want.

nginx for Windows http://nginx-win.ecsds.eu/
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 67
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready