오늘: 2|어제: 24|전체: 234,009|회원: 118 (+0)|문서: 56,040 (+0)|댓글: 8,019 (+0)|첨부파일: 1,389 (+0)


Nginx
2014.07.25 05:37

NGINX wordpress rewrite

조회 수 1601 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

+ - Up Down Comment Print
?

단축키

Prev이전 문서

Next다음 문서

+ - Up Down Comment Print
Extra Form

conf 폴더에 wordpress.conf 를 만듭니다. 내용은 아래와 같이 추가

# enforce NO www
    if ($host ~* ^www\.(.*))
    {
        set $host_without_www $1;
        rewrite ^/(.*)$ $scheme://$host_without_www/$1 permanent;
    }
 
    # canonicalize codeigniter url end points
    # if your default controller is something other than "welcome" you should change the following
    if ($request_uri ~* ^(/welcome(/index)?|/index(.php)?)/?$)
    {
        rewrite ^(.*)$ / permanent;
    }
 
    # removes trailing "index" from all controllers
    if ($request_uri ~* index/?$)
    {
        rewrite ^/(.*)/index/?$ /$1 permanent;
    }
 
    # removes trailing slashes (prevents SEO duplicate content issues)
    if (!-d $request_filename)
    {
        rewrite ^/(.+)/$ /$1 permanent;
    }
 
    # removes access to "system" folder, also allows a "System.php" controller
    if ($request_uri ~* ^/system)
    {
        rewrite ^/(.*)$ /index.php?/$1 last;
        break;
    }
 
    # unless the request is for a valid file (image, js, css, etc.), send to bootstrap
    if (!-e $request_filename)
    {
        rewrite ^/(.*)$ /index.php?/$1 last;
        break;
    }


워드프레스가 설치되는 도메인의 하단 } 위에 include /경로/wordpress.conf; 추가 하시면 됩니다.



List of Articles
글쓴이 분류 제목 조회 수
Luatic™ WordPress 워드프레스 최적화 #1 (작성중) 2 488
하얀바나나 XpressEngine XE, 재설치를 했는데도 설정이 그대로 남아 있을 때! 685
merkava Etc 퓨니코드 변환하기 711
YJSoft™ PHP FastCGI 환경에서 PHP Digest 인증 사용 1 715
Luatic™ 그누보드 5 ? 서버 이전 후 글쓰기/댓글쓰기가 안될때 726
Luatic™ Linux 리턴메일 분석 - 발송 실패 에러 메시지 791
Luatic™ WordPress 워드프레스 주소 변경 방법 file 859
YJSoft Etc Godaddy 도메인 루아틱에 연결하기 1 file 880
Luatic™ XpressEngine XE 1.8 에서 짧은 주소(rewrite) 없다고 나올때 file 917
종희 Etc 루아틱 시패널이 처음이신가요? 초보자가이드(?) 975
Luatic™ WebServer 크로스 브라우징을 위한 테스트 사이트 file 1040
Luatic™ Etc 루아틱 FTP 사용법, 파일질라 셋팅법 1 1051
Luatic™ XpressEngine 쉽고 강력한 XE 웹사이트 만들기 file 1086
merkava WordPress 워드프레스 최적화 1097
YJSoft™ XpressEngine Cloudflare Railgun 활성화 후 로그인이 몇초만에 풀린다면 3 1119
merkava Etc KISA에 SSL 관련하여 민원넣은 답변 3 file 1133
Luatic™ XpressEngine XE 레이아웃 제작 실무 노하우 1 file 1141
Luatic™ WebServer HTTP Status Code 1169
Luatic™ XpressEngine 다올 버전별 업데이트 방법 file 1310
Luatic™ PHP 루아틱 CDN 사용하기 4 file 1403
Board Pagination ‹ Prev 1 2 3 4 5 6 Next ›
/ 6

처음