google_scholar
The `google_scholar` directive enables or disables Google Scholar features in a specified location block.
Description
The google_scholar directive is part of the NGINX Module for Google, specifically designed to facilitate the creation of Google mirrors. When enabled within a location block, this directive manipulates requests to handle them appropriately for Google Scholar metadata and features, making the mirrored site interact with Google Scholar as if it were the original site. It offers a boolean parameter that accepts 'on' or 'off', allowing users to define the behavior for URLs contained within the location block.
This directive works in conjunction with other directives in the module, such as google, which must be enabled for it to function correctly. It affects how search results, indexing, and other Google Scholar-specific functionalities are presented to the user. Configuring this directive correctly ensures that the mirrored content is displayed as intended when accessed via Google Scholar, avoiding issues with search engine crawling and display errors. This is crucial for those looking to enhance the visibility of their mirrored content in Google Scholar searches.
Config Example
location /scholar {
google on;
google_scholar on;
}Ensure that the google directive is enabled first, as google_scholar relies on it.
Using google_scholar outside of a location context will lead to a configuration error.
The directive should be defined in the correct order relative to other directives to ensure expected behavior.