오늘: 1|어제: 15|전체: 233,504|회원: 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 워드프레스 속도, 성능 최적화하기 file 1780
Luatic™ MySQL 자주 쓰는 MySQL 명령어 정리 2298
Luatic™ MySQL MySQL에서 디비엔진을 선택할때의 선택 방법 1707
Luatic™ WordPress 워드프레스 브라우저 캐시 설정 file 1463
Luatic™ Linux CentOS Yum 사용법 1 1748
Luatic™ Etc 나라별 국가 코드 1 2291
Luatic™ WebServer HTTP Status Code 1169
Luatic™ XpressEngine W02 서버에서 XE 캐시 설정 file 1451
Luatic™ PHP PHP 언어 기반의 다양한 CMS 및 블로그 설명 1639
cholalo Windows 파이어폭스 캐쉬 초기화하는 방법 file 3572
Luatic™ XpressEngine 다올 버전별 업데이트 방법 file 1310
Luatic™ Nginx NGINX wordpress rewrite 1601
Luatic™ Windows 크롬에서 DNS 캐시 초기화하기 2514
고객지원 XpressEngine 유튜브와 같은 영상 쉽게 올리기. file 1782
Luatic™ Linux vi 에디터 단축 모음 1 1591
Luatic™ XpressEngine nginx에서 짧은 주소가 동작하지 않는 경우 해결 2 file 2308
Luatic™ Windows 티밍이란? 4 4885
Luatic™ ASP ASP.NET 란 file 2242
Luatic™ KimsQ RB 루아틱에서 KimsQ 설치 관련 팁 file 1598
Luatic™ KimsQ RB KimsQ 사용시 보안을 위해 로봇 접근 제한 robot.txt 내용 5 file 2398
Board Pagination ‹ Prev 1 2 3 4 5 6 Next ›
/ 6

처음