简体   繁体   中英

How to make a 301 redirect from https to http for the whole site (nginx/1.4.6 server)

I am very very sorry if i asked a stupid question)) I am an SEO analyst and i have to give my boss a code which will be used to redirect visitors from https to http version of the website.

Please give me the example of the code/scipt

Thanks, Stan

This is more a question for serverfault.

They have this answer for the other way around.

for you something like:

server {
       listen         80;
       server_name    my.domain.com;
       [....]
}

server {
       listen         443;
       server_name    my.domain.com;
       rewrite        ^ http://$server_name$request_uri? permanent;

       ssl            on;
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM