오늘: 13|어제: 15|전체: 234,259|회원: 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
글쓴이 분류 제목 조회 수
루아틱 Windows Windows 2003에서 IIS 6.0 설치(SSL 설정 1) 16767
Luatic™ XpressEngine W02 서버에서 XE 캐시 설정 file 1451
Luatic™ Linux vi 에디터 단축 모음 1 1591
루아틱 Linux Ubuntu apt-get 명령어 사용법 15122
루아틱 Linux Ubuntu 12.04 LTS Java7 설치시 오류 및 오류 해결법 30327
루아틱 PHP SSL 보안서버인증 적용하기 - 웹호스팅 (XE) 17139
Luatic™ XpressEngine ssh 쉘상에서 XE 간편하게 올리기 file 2919
Luatic™ Linux shell 상의 nano 에디터 사용법 2418
1sam PHP PHP 필수 강좌 - 정규식 Regular Expressions 1486
Luatic™ PHP PHP 언어 기반의 다양한 CMS 및 블로그 설명 1639
YJSoft Apache php 실행 확장자 변경 2663
Luatic™ Etc PHP 및 각 언어 소스 많은곳 1 2136
CharmingIrene PHP PHP 강좌 4편 - 제어문 3197
CharmingIrene PHP PHP 강좌 3편 - 연산자 2908
CharmingIrene PHP PHP 강좌 2편 - 변수(variable) 4991
CharmingIrene PHP PHP 강좌 1편 - 기초 file 2997
Luatic™ XpressEngine nginx에서 짧은 주소가 동작하지 않는 경우 해결 2 file 2308
Luatic™ Nginx NGINX wordpress rewrite 1601
Luatic™ MySQL MySQL에서 디비엔진을 선택할때의 선택 방법 1707
루아틱 MySQL mysql DB 백업과 복구 17609
Board Pagination ‹ Prev 1 2 3 4 5 6 Next ›
/ 6

처음