FrontPage htaccess
이글은 http://youdomain.com/wiki.php/FrontPage와 같이 나타나는 URL을 http://yourdomain.com/FrontPage와 같이 reading-friendly하게 URL을 사용하고자 하는 목적에서 썼습니다. .htaccess를 이용해서 RewriteEngine
on으로 하여 사용하면 되는데, 이럴 때 아래와 같은 문제가 생깁니다.

  1. icons들이 사라진다. (editing, searching을 위한 아이콘들이 사라집니다).
  2. 키보드 약식명령어가 말을 안듣는다.

위의 두 문제를 제외하고는 .htaccess 방법이 잘 움직입니다. 만드는 방법으로는

  1. 제일 위쪽의 디렉토리에 .htaccess 파일을 만듭니다.
  2. 애래 내용을 넣어둡니다.

    RewriteEngine on
    RewriteBase /
    # / => /wiki.php?FrontPage
    # RewriteRule ^$ wiki.php/FrontPage [L]
    # don't touch some reserved urls

    RewriteCond %{REQUEST_FILENAME} -f
    RewriteRule . - [L]
 
    # wiki page requests
    RewriteRule ^(.*) wiki.php/$1?%{QUERY_STRING} [L]

    <Files d>
        SetHandler application/x-httpd-php
    </Files>
    ErrorDocument 404 /errors/404.html
  1. http://yourdomain.com/FrontPage 로 접속해 봅니다. 잘 나오면 성공한 것입니다.
  2. 이때, 오른 쪽에 보이는 icon들이 제댇로 보이는지 확인해 봅니다.

만약에 나오지 않으면 (글자로 대체되어 있거나, x박스가 뜨거나 할 경우) -

  1. wiki.php를 엽니다.
  2. 730 line경의


 
else $iconset .='-'; 
 
else $iconset .= '/'; 
로 대체합니다.

  1. 그 다음 다음 줄의


 if (!file_exists($this->imgs_real_dir.'/'.$iconset.'home.png')) $ext = 'gif'; 
을 아래와 같이 대체합니다.
 if (!file_exists($this->imgs_real_dir.'/'.$iconset.'home.png')) $ext = 'png'; 

다시 http://yourdomain.com/FrontPage로 접속해서 icons들이 잘나오나 확인합니다.

  1. 다음으로 config.php 파일을 열어

 $kbd_script= $url_prefix.'/css/kbd.js'; 
 $kbd_script= $url_prefix.'/css/kbds.js'; 
로 바꾸어 줍니다.
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2014-03-17 22:50:31
Processing time 0.0056 sec