Code: Select all
<link rel="search" type="application/opensearchdescription+xml" title="TONTEC 知识库/问答中心" href="/search.html" />
Code: Select all
view-source:http://kb.tontec.cn/opensearch.php
Code: Select all
if ($faqconfig->get('main.enableRewriteRules')) {
$links_template_vars = array(
"faqHome" => $faqconfig->get('main.referenceURL'),
"msgSearch" => '<a href="' . $systemUri . 'search.html">'.$PMF_LANG["msgAdvancedSearch"].'</a>',
'msgAddContent' => '<a href="' . $systemUri . 'addcontent.html">'.$PMF_LANG["msgAddContent"].'</a>',
"msgQuestion" => '<a href="' . $systemUri . 'ask.html">'.$PMF_LANG["msgQuestion"].'</a>',
"msgOpenQuestions" => '<a href="' . $systemUri . 'open.html">'.$PMF_LANG["msgOpenQuestions"].'</a>',
'msgHelp' => '<a href="' . $systemUri . 'help.html">'.$PMF_LANG["msgHelp"].'</a>',
"msgContact" => '<a href="' . $systemUri . 'contact.html">'.$PMF_LANG["msgContact"].'</a>',
"backToHome" => '<a href="' . $systemUri . 'index.html">'.$PMF_LANG["msgHome"].'</a>',
"allCategories" => '<a href="' . $systemUri . 'showcat.html">'.$PMF_LANG["msgShowAllCategories"].'</a>',
'showInstantResponse' => '<a href="' . $systemUri . 'instantresponse.html">'.$PMF_LANG['msgInstantResponse'].'</a>',
'showSitemap' => '<a href="' . $systemUri . 'sitemap/A/'.$LANGCODE.'.html">'.$PMF_LANG['msgSitemap'].'</a>',
'opensearch' => $systemUri . 'search.html');
} else {
$links_template_vars = array(
"faqHome" => $faqconfig->get('main.referenceURL'),
"msgSearch" => '<a href="index.php?'.$sids.'action=search">'.$PMF_LANG["msgAdvancedSearch"].'</a>',
"msgAddContent" => '<a href="index.php?'.$sids.'action=add">'.$PMF_LANG["msgAddContent"].'</a>',
"msgQuestion" => '<a href="index.php?'.$sids.'action=ask">'.$PMF_LANG["msgQuestion"].'</a>',
"msgOpenQuestions" => '<a href="index.php?'.$sids.'action=open">'.$PMF_LANG["msgOpenQuestions"].'</a>',
"msgHelp" => '<a href="index.php?'.$sids.'action=help">'.$PMF_LANG["msgHelp"].'</a>',
"msgContact" => '<a href="index.php?'.$sids.'action=contact">'.$PMF_LANG["msgContact"].'</a>',
"allCategories" => '<a href="index.php?'.$sids.'action=show">'.$PMF_LANG["msgShowAllCategories"].'</a>',
"backToHome" => '<a href="index.php?'.$sids.'">'.$PMF_LANG["msgHome"].'</a>',
'showInstantResponse' => '<a href="index.php?'.$sids.'action=instantresponse">'.$PMF_LANG['msgInstantResponse'].'</a>',
'showSitemap' => '<a href="index.php?'.$sids.'action=sitemap&lang='.$LANGCODE.'">'.$PMF_LANG['msgSitemap'].'</a>',
'opensearch' => '?'.$sids.'action=search');
}
This opensearch code should be modified to
Code: Select all
if ($faqconfig->get('main.enableRewriteRules')) {
$links_template_vars = array(
...
'opensearch' => $systemUri .'opensearch.html');
} else {
$links_template_vars = array(
...
'opensearch' => $systemUri .'opensearch.php';
}
Code: Select all
# the open search page
RewriteCond %{REQUEST_URI} opensearch\.html$ [NC]
RewriteRule ^(.*)$ opensearch.php [L,QSA]