Manual:$wgSearchForwardUrl/zh

Category:MediaWiki configuration settings/zh#SearchForwardUrlCategory:MediaWiki configuration settings introduced in version 1.4.0/zh#SearchForwardUrlCategory:MediaWiki configuration settings still in use/zh#SearchForwardUrlCategory:Search variables/zh#SearchForwardUrl
: $wgSearchForwardUrl
Set this to a URL to forward search requests to an external location.
引进版本:1.4.0
移除版本:仍在使用
允许的值:(URL字符串)
null

详情

Set this to a URL to forward Special:Search to an external location. If the URL includes $1, this will be replaced with the URL-encoded search term. For example, to forward to DuckDuckGo you could set the following (below $wgServer) in LocalSettings.php:

$wgSearchForwardUrl = 'https://duckduckgo.com/?q=$1&sites=' . $wgServer;

You also need to set $wgDisableTextSearch = true; or $wgSearchForwardUrl is ignored.

From versions 1.4.8 to 1.4.15, this setting was incorrectly named $wgForwardSearchUrl in DefaultSettings.php. If you are using one of those versions then this alternative name should be used instead.
Category:MediaWiki configuration settings/zh Category:MediaWiki configuration settings introduced in version 1.4.0/zh Category:MediaWiki configuration settings still in use/zh Category:Search variables/zh