티스토리 뷰
사이트 주소 체계 변경에 따른 확장자 제거용 nginx rewirte 세팅
if ($request_uri ~* ^(/index.html(.*)|/(.*)\.html(.*))) {
# return 302 /$1$2;
rewrite ^/index.html(.*)$ /$1 permanent;
rewrite ^/(.*)\.html(.*)$ /$1$2 permanent;
# break;
}
기본설정 경로 호출이나 html파일 호출 시 확장자 지우고 rewrite 처리
'serverSide > Linux' 카테고리의 다른 글
[Nginx] http 접속 시 https로 자동 연결되는 문제 (0) | 2020.10.07 |
---|---|
[ubuntu] 보안 업데이트만 진행 (0) | 2020.09.10 |
[nginx] alias rewrite 설정 (0) | 2020.06.18 |
[centOS7] cifs to server2012R2 and fstab (0) | 2020.06.10 |
[nginx] 가상호스팅 SSL 인증서 추가 (0) | 2020.06.10 |
댓글