1

We can enable OpenSearch in Joomla search-component to insert links in <head> section like this:

<link href="http://site.name/component/search/?id=45&amp;Itemid=104&amp;format=opensearch" rel="search" title="title" type="application/opensearchdescription+xml" />

When follow this link I download xml with OpenSearch description.

I disabled this function in search-module, so there is no links in <head> sections. But! If I follow directly http://site.name/component/search/?format=opensearch I still download same xml-file.

How does it work? Where is this file created? How can I compleatly disable OpenSearch to disallow dowloading of this file?

1
  • I also have similar problem. Google bot tries to crawl that link with a 500 server error. So i disabled "OpenSearch Autodiscovery" in the search module. And then I had to tell google not to go to that link by adding Disallow: /component/search/ in robots.txt Jan 16, 2019 at 23:46

1 Answer 1

0

The only way I found was to block creating of this xml-file in search-component:

// components/com_search/views/search/view.opensearch.php
class SearchViewSearch extends JViewLegacy
{
    public function display($tpl = null)
    {
        // Return HTTP-code 404
        header( "HTTP/1.1 404 Not Found" );
        exit();
        ...
    }
}

It is not very good solution, but I don't know another way. Now when follow this link I recieve HTTP-code 404.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.