Help:リダイレクト(転送ページ)

From mediawiki.org
This page is a translated version of the page Help:Redirects and the translation is 64% complete.
PD 注意: このページを編集すると、編集内容が CC0 のもとで公開されることに同意したと見なされます。詳細はパブリック・ドメインのヘルプ ページを参照してください。 PD

リダイレクト (転送ページ) は、利用者にあるページの名前を別の名前で参照させるために使用されます。 特定の記事が、複数の名前で参照される場合や、記事名に代替の句読記号、大文字化、綴りがある場合に、役立ちます。

転送の種類

転送には2つの種類があります。

  • 直接転送: 転送ページを開いた利用者は,転送先ページ(たいていは同じwiki上の異なるページ)に直接的に誘導されます。 本稿は直接転送についてのみ扱っています。
  • 間接転送: 利用者は転送ページに留まりますが,表示されたリンクを辿って転送先ページへ移動できます。 間接参照はテンプレートを用いて実現するのが普通です。対応するMetaウィキの記事も参照してください。
$wgDisableHardRedirects が有効になっているウィキ(ほとんどのウィキメディア・プロジェクトなど)では、特別ページへの直接転送(たとえばSpecial:MyLanguage)やローカルにない他のウィキへの転送は作成できません。それらは自動的に間接転送になります。

操作性

直接転送においては,転送先ページへ即座に移動します。 しかしながら,転送先の題名の下に転送が行なわれた旨の小さな通知が表示されます。

Help:Redirects
提供:MediaWiki
Help:Redirectから転送)

転送の作成

ページが移動したさいには,旧ページから新ページへの転送が自動的に作成されます。

suppressredirect権限がある利用者は、ページ移動のさいに転送を作成しないようにできます。 既定では、この権限は管理者およびボットに割り当てられています。

転送先のページを新規作成することもできます(Help:ページの新規作成 を参照)。 ページとして無効にしている、存在するページに行き最上部にある「編集」、「Edit」タブを使用することでそのページを使用することもできます。 上のどちらの場合でも、ページの編集ボタンの初めのテキストの位置に下のコードを挿入することで作成できます:

#REDIRECT [[ページ名]]

ページ名 はリダイレクト先のページ名です。 The word "redirect" is not case-sensitive, but there must be no space before the "#" symbol. Any text before the code will disable the code and prevent a redirect. Any text or regular content code after the redirect code will be ignored (and should be deleted from an existing page). However, to put or keep the current page name listed in a Category, the usual tag for that category is entered or kept on a line after the redirect code entry.

Redirections can be simple page names or specified using a namespace. They can be suffixed with a section name if you have the corresponding anchor defined on the target page.[1]

Examples of valid operational redirections:

  • #REDIRECT[[Help:Magic_words#Page_names]]
  • #redirect [[Help:Magic_words#URL_encoded_page_names]]
  • #Redirect [[Manual:$wgConf]]
  • #REDIRECT [[MediaWiki/fr]] the translated page is imposed

入力したリダイレクト先ページ名が正しいことを確認するために「プレビュー」すべきです (編集ウィンドウの下のボタンか、または Alt+P)。

リダイレクトが有効の (機能している) ときはプレビューしたテキストに、例として以下のように「次の行」アイコン (イメージ) とともに指定したリダイレクト先の名前が見えます。

 Help:Magic words#URL encoded page names

これは絶対にゲットするべきものです。

リダイレクトが有効でないときはプレビューしたテキストは青の目的のページが入った番号付きリストの項目のように見えることでしょう。 (そのまま保存した場合リダイレクト ページの内容にもなります)

1. REDIRECT  ページ名

入力した ページ名 が有効なページではない場合は、赤文字で表示されます。 有効なリダイレクト先ページが存在しないようなリダイレクトを作成してはいけません。

制限

転送先に指定するページ名は変数・テンプレート・パーサ関数であってはなりません。 そういったページ名を用いた場合,転送ページから自動的に移動しないでしょう。

転送が禁止されている(動作しない)例:

JavaScript page redirect

In order to avoid JavaScript functionality from breaking, all JavaScript pages have a different redirect syntax from regular pages. This syntax allows for proper execution of the page by the browser's JavaScript engine, as well as being recognised by MediaWiki as a redirect. To create a JavaScript page redirect, the format that must be used is as follows:

/* #REDIRECT */mw.loader.load( "{{fullurl:Target.js|action=raw&ctype=text/javascript}}" );

Where Target.js is the target page name.

リダイレクトの閲覧

リダイレクトを作成した後は、ページの名前や、その名前を使ったリンクを通じて、そのページにアクセスすることはできなくなります。 ただし、転送された先のページの先頭付近に、転送されたことを示す通知がソースページ名のアクティブリンクと共に表示されます。 このリダイレクトページへのリンクをクリックすると、大きなカギ矢印とリダイレクト転送先が表示されます。 This adds &redirect=no URL parameter.

Help:Redirection
提供:MediaWiki
転送ページ

Help:Redirect

このようにすることで、あらゆるウィキページで許可されているすべてのことができます。 リダイレクトについての議論をするには、そのリダイレクト ページに関連付けられた議論ページを使用してください。 ページの履歴を、リダイレクトの記録も含めて閲覧できます。 リダイレクトに誤りがある場合は、ページを編集してください。または、リダイレクトを除去するために古い版へ差し戻してください。

リダイレクトの削除

一般に、リダイレクトを削除する必要はありません。 それらはデータベース容量をたいして占有しません。 If a page name is vaguely meaningful, there's no harm, and some benefit, in having it as a redirect to the more relevant or current page.

If want to move a page over a redirect that has only one edit in its history and targeted to the old page name, there is no need to delete the redirect: it is overwritten. If the redirect has more than one history entry, or the redirect target is somewhere else, then it can only be deleted-and-moved by an administrator.

リダイレクトを削除する必要がある場合 (例えば、リダイレクトのページ名が不快である場合、または人々がその名前による概念で照会することを思いとどまらせたい場合) は、前述の通り、単にリダイレクトのページに行って、Help:削除と復元 にある手順に従ってください。

Problematical redirects

二重リダイレクト

二重リダイレクト、つまり別のリダイレクト ページへのリダイレクトは、動作しないでしょう。[2] 代わりに、次のリダイレクト ページ自身が表示されます。 これは、無限ループを回避するためであり、物事を単純に保つためでもある、慎重な制限です。

しかし、この事は二重リダイレクトを探し出し、その代わりに1ステップのリダイレクトに変更する事によってそれらを削除すべきである事を意味します。 重要なページ移動の後にこれをするのが最も必要がありそうです。 ツールボックス内の「リンク元」のリンクで特定のページへの二重リダイレクトを見つけるか、ウィキ全体の中でそれを見つけるために Special:DoubleRedirects を使用してください。

There is an option, $wgFixDoubleRedirects , to automatically fix double redirects with a job queue. However, it tends to aggravate page move vandalism, so it is disabled by default. The __STATICREDIRECT__ magic word can be used to skip the double-redirect fix on a particular page.

Broken redirects

If the target page does not exist, the redirect is broken: redirection will not occur. You may find all broken redirects at Special:BrokenRedirects.

カテゴリ名前空間内のページヘのリダイレクト

カテゴリ ページへリダイレクトして、さらにそのリダイレクトがカテゴリ内に現れないようにするには、「Category」の前にコロンを付けます。付けないと、リダイレクトページ自身もリダイレクト先のカテゴリに属すことになります。

#REDIRECT [[:Category:Glossary]]

Transcluding a redirect

When a page called for inclusion is a redirect page, the redirect target is included instead, with the same parameters, without any redirect message. A double redirect does not work.

This allows to create several names for the same template.

Links to redirect

An internal link to a redirect page has CSS class mw-redirect. This can be useful to make them stand out, for clean-up work involving bypassing redirects.

関連項目

脚注

  1. From 2006 development, after 2004 bug report.
  2. これは$wgMaxRedirects にコントロールされている場合があります。