Home 게시판 커뮤니티 Q&A 고유 주소 설정시 Not Found 문제..

3개 답변, 3 voices Last updated by Avatar of 이완근이완근 9 years, 4 months 전
  • Avatar of bawoobawoo
    Participant
    @bigbawoo
    #6271

    워드프레스를 사용하고 있습니다.
    이 과정에서 이용자들 편의를 위해서 고유 링크를 사용하려고 하는데, 문제는, 이 옵션을 사용하면 URL에 대해 페이지를 찾지 못한다는겁니다.

    본래
    http://bawoos.net/?p=11
    이와 같은 URL을 가지고 있던 링크에 대해서 고유링크를 설정하면
    http://bawoos.net/films_review/11 이와 같이 바뀌는 옵션인데요

    여기서 mod_rewrite 모듈이 필요하다는데 cafe24는 제공하는 듯하고,
    더해서 .htcaccess 파일을 설정하는게 필요하다 해서

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /wp/
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    이와 같이 맞게 해놓았고, 다 되어있는데
    이상하게 바뀐 페이지에 들어가기만 하면 Not Found라는 문구만 뜹니다.

    http://bawoos.net/?p=11
    이 링크는 열리는데요.

    고유링크를 설정한 후에
    http://bawoos.net/films_review/11
    이 링크는 열리지가 않습니다.

    이상한 건,

    http://bawoos.net/index.php/films_review/11
    이 링크는 된다는 겁니다…

    말하자면, 모듈로 “설정해준” URL: 스크린샷에는 index.php이 없는데 “실제” URL에는 index.php가 들어있어서 제대로 인식을 하지 못하는 것 같습니다. 뭐를 고쳐야할지 몰라 여기에 질문을 올립니다. 도와주세요..

    Avatar of bawoobawoo
    Participant
    @bigbawoo
    #6273

    (추가) 여기저기 찾다보니,
    http://wordpress.org/support/topic/permalinks-not-working-without-indexphp-in-the-url
    여기에서 저와 같은 문제를 얘기하는 듯한데
    Problem solved!
    What I discovered is that when I change the permalink structure the old rewrite rules are still cached in the database and don’t get updated.
    There is a record in the wp_options table with an index field called “option_name”. I found the record with the option_name of “rewrite_rules” and set the option_value blank. That forced it to generate the new values and it started working immediately.
    I don’t know why it didn’t update when I change things in the control panel, but at least my problem is solved and it is working now.

    이렇게 맨 마지막에 해놨네요.. 이걸 어떻게 적용할 수 있는지 모르겠습니다.

    Avatar of 082net082net
    Keymaster
    @082net
    #6275

    제가 보기엔 wordpress.org 포럼에서 찾으신 방법은 현재 겪고계신 문제를 해결하는 방법은 아닌것으로 보입니다. 호스팅업체에서 서버 소프트웨어 정보를 보안상 숨기는 과정에서 발생하는 문제로 보이네요. 같은 문제에 대한 해결책이 있으니 링크 남겨드립니다.

    http://082net.com/2009/994/fix-server-software-info-for-apache/

    Avatar of 082net
    Facebook 사용자 모임 그룹 도 함께 운영되고 있으며, 격 주로 미트업과 스터디를 진행하고 있으니 관심 있으신 분들의 많은 참여 바랍니다 🙂
    Avatar of 이완근이완근
    Participant
    @icedwnut
    #27311

    @bawoo님
    해결 하셨는지는 모르겠습니다만,
    혹시 다른 분들을 위해서 답변 남겨놓습니다.

    아래 링크대로 하시면 고유 주소 오류 해결할 수 있습니다.

    https://haandol.wordpress.com/2013/09/03/apache2-wordpress-unicode-url-404%EC%97%90%EB%9F%AC-%EB%AC%B8%EC%A0%9C/

4 글 보임 - 1에서 4 까지 (총 4 중에서)
  • 답변은 로그인 후 가능합니다.