rewrite 썸네일형 리스트형 Nginx에서 URL 재작성 규칙을 설정하는 방법 Nginx에서 URL 재작성(Rewrite) 규칙을 설정하는 방법Rewrite 규칙을 설정에는 rewrite 지시어와 try_files 지시어를 사용합니다. 1. 특정 URL을 다른 URL로 리디렉션 (301/302 리다이렉트)location /old-page { return 301 https://example.com/new-page;}/old-page로 접근하면 /new-page로 영구 리디렉션(301)됨302 리다이렉트를 하려면 return 302로 변경2. URL 패턴 변경 (rewrite 사용)location /blog { rewrite ^/blog/(.*)$ /articles/$1 break;}/blog/some-post → /articles/some-post로 변경break는 해당 .. 더보기 [Apache] 웹서버에서 http를 https(SSL)로 리다이렉트하는 방법 웹서버에서 http를 https(SSL)로 리다이렉트하는 방법 rewrite 모듈 활성화 LoadModule rewrite_module modules/mod_rewrite.so ###httpd.conf $ vim httpd.conf LoadModule rewrite_module modules/mod_rewrite.so 모듈 확인 httpd -M $ httpd -M | egrep -i rewrite rewrite_module (shared) 가상호스트 설정 httpd-vhosts.conf 편집 RewriteEngine on RewriteCond %{HTTPS} off RewriteRule ^.*$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] $ vim httpd-vhos.. 더보기 이전 1 다음