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.
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