Manual:$wgSearchForwardUrl/zh

From Linux Web Expert

Revision as of 03:06, 9 November 2022 by imported>Zys6913 (Created page with "== 详情 ==")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

<translate> Search</translate>: $wgSearchForwardUrl
Set this to a URL to forward search requests to some external location.
<translate> Introduced in version:</translate>1.4.0
<translate> Removed in version:</translate><translate> still in use</translate>
<translate> Allowed values:</translate>(URL字符串)
<translate> Default value:</translate>null

详情

Set this to a URL to forward search requests to some external location. If the URL includes '$1', this will be replaced with the URL-encoded search term. For example, to forward to Google you'd have something like:

$wgSearchForwardUrl = 'http://www.google.com/search?q=$1' .
                      '&domains=http://example.com' .
                      '&sitesearch=http://example.com' .
                      '&ie=utf-8&oe=utf-8';

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.