nginx domain name 301 redirect rewrite jump no www jump to www

WBOY
Release: 2016-07-29 08:59:51
Original
1104 people have browsed it

Seerver {i Listen 80;

server_name www.xxx.com xxx.com;
if ($ host = xxx.com) {
rwrite ^/(.*) $ Http://www.xxx.com/ $1 Permanent;
}

error_page 502 503 504 /50x.html ;
local = /50x.html {
root html; set_header X-Real-IP $ remote_addr;
proxy_set_header
The above introduces nginx domain name 301 redirection, rewrite jump, no www jump to www, including the content, I hope it will be helpful to friends who are interested in PHP tutorials.


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template