<? header('Location: http://www.example.com/'); ?>
1) www 붙이고 접속했을 때 www 없이 접속하는 법
server{
if ($http_host = "www.eond.com") { rewrite ^ http://eond.com$request_uri permanent; }
}
2) www 없이 접속했을 때 무조건 www 붙이기
if ($http_host != "www.example.com") {
rewrite ^ http://example.com$request_uri permanent;
}
우분투 서버에 Nginx + PHP7 로 세팅했는데, 간혹가다 502 에러가 발생했습니다.
/var/log/nginx/eond.com.error.log
매일 에러 로그가 쌓입니다.
파일을 찾지 못해 생기는 오류는 하나씩 찾아 수정하면 되는데..