DokuWiki のデフォルト設定では URL を書き換えず、URL はこんな感じになります:
http://example.com/doku.php?id=page
これを以下のようなurlになるよう変更します
http://example.com/page
- dokuwiki関連用設定ファイルに以下を追記
# rewrites for dokuwiki $HTTP["url"] =~ "^/" { index-file.names = ("doku.php") } url.rewrite-once = ( "^/lib/.*$" => "$0", "^/_media/(.*)?\?(.*)$" => "/lib/exe/fetch.php?media=$1&$2", "^/_media/(.*)$" => "/lib/exe/fetch.php?media=$1", "^/_detail/(.*)?\?(.*)$" => "/lib/exe/detail.php?media=$1&$2", "^/_detail/(.*)?$" => "/lib/exe/detail.php?media=$1", "^/_export/([^/]+)/(.*)\?(.*)$" => "/doku.php?do=export_$1&id=$2&$3", "^/_export/([^/]+)/(.*)" => "/doku.php?do=export_$1&id=$2", "^/doku.php.*" => "$0", "^/feed.php.*" => "$0", "^/(.*)\?(.*)" => "/doku.php?id=$1&$2", "^/(.*)" => "/doku.php?id=$1" )
- lighttpdのモジュール設定ファイルでrewriteモジュールを設定
server.modules = ( "mod_rewrite", <= コメントを外して生かす "mod_access", # "mod_evasive", # "mod_auth", # "mod_authn_file", # "mod_redirect", # "mod_setenv", # "mod_alias", )
dokuwikiの設定画面で以下の設定を行います
service lighttpd restart