URLを短く表記する

MediaWikiを、いわゆる「ショートURL」で運用する手順。
公式:Manual:Short URL/Page titleにある

  • In LocakSetting.php
  • Alternate option II

のふたつを設定。

ただしこの方法だとMediaWiki日本語版の「/メインページ」がうまくリダイレクトしないので、最終的には

RewriteEngine on

RewriteCond         %{REQUEST_URI} !index.php
RewriteCond         %{REQUEST_FILENAME}  -f [OR]
RewriteCond         %{REQUEST_FILENAME}  -d [OR]
RewriteCond         %{REQUEST_FILENAME}  -l
RewriteRule  ^(.+)  /home/hbtz/www/$1  [L]

# redirect to main page
RewriteRule ^/$ /index.php?title=メインページ [L,QSA]

# anything else is to be treated as a title
RewriteCond         %{REQUEST_URI} !index.php
RewriteRule ^(.+)$ /index.php?title=$1 [L,QSA]

という設定でうまくいった。(.htaccessはUTF-8Nで保存)