dokuwiki立ち上げ
DokuWiki立ち上げ
さくらのレンタルサーバー
urlの最適化
urlの末尾を?=なんちゃらではなく、スラッシュで区切られたネームスペース、ページ名とするための変更。
- ./.htaccess.dist を ./.htaccessへコピーし、下記のコメントアウト部分を復活
- DokuWikiのサイト設定で、「URLの書き換え」を .htaccess に、「URLの名前空間の区切りにスラッシュを使用」のチェックをオンに、それぞれ変更
なお、indexmenuプラグインの「新規」でページを追加することが出来なくなるようだ(区切りのスラッシュをurlencodeしているのがだめ)。
.htaccessの変更箇所(抜粋、コメントアウトを復活させる部分のみ)
## Uncomment these rules if you want to have nice URLs using ## $conf['userewrite'] = 1 - not needed for rewrite mode 2 RewriteEngine on RewriteRule ^_media/(.*) lib/exe/fetch.php?media=$1 [QSA,L] RewriteRule ^_detail/(.*) lib/exe/detail.php?media=$1 [QSA,L] RewriteRule ^_export/([^/]+)/(.*) doku.php?do=export_$1&id=$2 [QSA,L] RewriteRule ^$ doku.php [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule (.*) doku.php?id=$1 [QSA,L] RewriteRule ^index.php$ doku.php ## Not all installations will require the following line. If you do, ## change "/dokuwiki" to the path to your dokuwiki directory relative ## to your document root. RewriteBase /
最後の行の RewiteBase / も復活させないとうまく動かなかった。
参考サイト
dokuwiki立ち上げ.txt · 最終更新: 2024/02/20 09:28 by akayoroshi