Commit 2c54534f authored by omega8cc's avatar omega8cc

Send all known bots to $args free URLs in Nginx.

parent ab62f773
......@@ -503,6 +503,20 @@ location @cache {
### Send all not cached requests to drupal with clean URLs support.
###
location @drupal {
error_page 418 = @nobots;
if ($args) {
return 418;
}
rewrite ^/(.*)$ /index.php?q=$1 last;
}
###
### Send all known bots to $args free URLs.
###
location @nobots {
if ($is_bot) {
rewrite ^ $scheme://$host$uri? permanent;
}
rewrite ^/(.*)$ /index.php?q=$1 last;
}
......
......@@ -489,6 +489,20 @@ location @cache {
### Send all not cached requests to drupal with clean URLs support.
###
location @drupal {
error_page 418 = @nobots;
if ($args) {
return 418;
}
rewrite ^/(.*)$ /index.php?q=$1 last;
}
###
### Send all known bots to $args free URLs.
###
location @nobots {
if ($is_bot) {
rewrite ^ $scheme://$host$uri? permanent;
}
rewrite ^/(.*)$ /index.php?q=$1 last;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment