サブドメインで動作するオープン検索定義を取得しようとしています。
<head>
htmlに正しい行を追加しました。
例:
<link rel="search" type="application/opensearchdescription+xml" title="Example" href="http://www.example.org/opensearch.xml" />
opensearch.xml で:
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<ShortName>Example</ShortName>
<LongName>Example Search</LongName>
<Description>Example Description</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16" type="image/x-icon">http://www.example.org/favicon.ico</Image>
<Url type="text/html" method="get" template="http://www.example.org/search/{searchTerms}" />
</OpenSearchDescription>
http://www.example.orgにアクセスすると、Google Chrome のオムニボックス設定に検索が正しく追加されます。トリガー キーワードは「example.org」になります。
ただし、 http://subdomain.example.orgにアクセスすると、 に同じ行があり<head>
、「example.org」ではなく「subdomain.example.org」というトリガー キーワードを使用して検索が追加されます。
これを回避する方法はありますか?
http://www.opensearch.org/Specifications/OpenSearch/1.1のドキュメントにトリガー キーワードを設定する方法に関する情報は見つかりませんでした。