Manual:$wgUrlProtocols/ja

詳細
MediaWiki が認識する URL プロトコルを定義します. This is used in lots of places. The most visible effect is it determines what protocols are allowed for external links: unrecognized protocols are ignored, no link is generated. However, it's used in many other places too, including the code for Special:LinkSearch, and utility functions like  that are used in a wide variety of different places.

機能しないいくつかの例 ( は有効なプロトコルとして定義されていないため):


 * test://www.example.com
 * [test://www.example.com]
 * [test://www.example.com リンク テキスト]

Some browsers, like Mozilla Firefox, will not follow file URLs on pages that have been loaded via HTTP. This is a security measure. See this mozillaZine article for more information, including some hints on how to overcome this restriction.

Most browsers do not support "remote file" URLs like file://host/share (only Internet Explorer handles these per default. For Firefox, a plugin is required or use exactly 5 slashes like file://///host/share, see )

In MediaWiki 1.20.2+, adding  without trailing slashes to   will break image embedding using the   syntax. This is a known bug related to a change that made URL protocol matching case-insensitive. As a workaround, use  instead of   as shown below.

変更 (MW 1.6 以降)
ローカルファイルへのリンク(これはイントラネットの状況で意味があるかも知れません)を許可するには, [[Special:MyLanguage/Manual:LocalSettings.php|LocalSettings.php] にこれを入れてください. ]:

Usually you only want to add protocols to this array. The default protocols should all be safe to click on (no evil side effects), and removing a protocol from the list will cause URLs using those protocols to become unrecognized in many places throughout the software. In particular, removing 'http://' or other common protocols will probably break huge amounts of stuff. Nevertheless, if you need to do so (for example, you already have a News: namespace), you can do something like this:

MediaWiki 1.6.0 でデフォルト値が変更されました. それより前のバージョンでは以下のプロトコルはデフォルトでは認識されません:


 * telnet://
 * nntp://
 * worldwind://

MediaWiki 1.22.0 での既定値は以下の通り:

変更 (MW 1.5)
In earlier versions the setting was a regexp expression which matched the beginning part of the URI; in other words, it is a set of prefixes separated by '|' (with '/' converted to '\/' because '/' has a special meaning in a regular expression.

このデフォルト値は、MediaWiki が外部リンクとしての接頭辞に続けてのURIを生成する事を生じさせます.


 * http://
 * https://
 * ftp://
 * irc://
 * gopher://
 * news:
 * mailto:

過去のバージョン
より古いバージョンでこの機能が必要な場合は、./includes/Parser.php 内に関数 replaceExternalLinks があります. そこにご希望のプロトコルの行を追加するだけです.