You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ho...@apache.org on 2023/10/03 21:22:13 UTC
[solr-site] branch main updated: Revert "Fix Robots header for old ref guide pages"
This is an automated email from the ASF dual-hosted git repository.
houston pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr-site.git
The following commit(s) were added to refs/heads/main by this push:
new 0f7b406f2 Revert "Fix Robots header for old ref guide pages"
0f7b406f2 is described below
commit 0f7b406f281832b8108dcbc23cab6493cc06e514
Author: Houston Putman <ho...@apache.org>
AuthorDate: Tue Oct 3 17:21:54 2023 -0400
Revert "Fix Robots header for old ref guide pages"
This reverts commit a99704e8c6814175ad72180762aff1191ac337ef.
---
themes/solr/templates/htaccess.ref-guide-old | 8 ++++++++
themes/solr/templates/htaccess.template | 7 +------
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/themes/solr/templates/htaccess.ref-guide-old b/themes/solr/templates/htaccess.ref-guide-old
index 3c7d72d39..42cbf88fa 100644
--- a/themes/solr/templates/htaccess.ref-guide-old
+++ b/themes/solr/templates/htaccess.ref-guide-old
@@ -1,3 +1,11 @@
+# Do not index old reference guide pages on search engines, except for pages that don't exist in 9+
+<If "%{REQUEST_URI} =~ m#/?guide/(6|7|8)_.*#">
+ Header always set X-Robots-Tag "noindex,nofollow,noarchive"
+</If>
+<If "%{REQUEST_URI} =~ m#/?guide/8_11/(adding-custom-plugins-in-solrcloud-mode|blob-store-api|blockjoin-faceting|cdcr-api|cdcr-architecture|cdcr-config|cdcr-operations|colocating-collections|cross-data-center-replication-cdcr|dataimport-screen|errata|metrics-history|migrate-to-policy-rule|putting-the-pieces-together|rule-based-replica-placement|solrcloud-autoscaling-api|solrcloud-autoscaling-auto-add-replicas|solrcloud-autoscaling-fault-tolerance|solrcloud-autoscaling-listeners|solrcloud [...]
+ Header always unset X-Robots-Tag
+</If>
+
# Existing pages moved to sub path in the 9.0 guide
RedirectMatch 301 ^/guide/(about-this-guide|relevance|solr-glossary|solr-tutorial)\.html /guide/solr/latest/getting-started/$1.html
RedirectMatch 301 ^/guide/(aliases|audit-logging|authentication-and-authorization-plugins|basic-authentication-plugin|circuit-breakers|client-apis|cloud-screens|cluster-node-management|collection-management|collections-core-admin|configuring-logging|enabling-ssl|hadoop-authentication-plugin|indexupgrader-tool|installing-solr|jvm-settings|jwt-authentication-plugin|kerberos-authentication-plugin|mbean-request-handler|metrics-reporting|performance-statistics-reference|ping|plugins-stats-scr [...]
diff --git a/themes/solr/templates/htaccess.template b/themes/solr/templates/htaccess.template
index ed4991d67..340cc8fc3 100644
--- a/themes/solr/templates/htaccess.template
+++ b/themes/solr/templates/htaccess.template
@@ -88,12 +88,7 @@ RewriteRule ^(docs|guide)/\d+(?!.+\.\w+$|.+/$).+$ $0/ [R=301,L]
# __root/docs.solr.apache.org/ is a special alias added by INFRA-19439, so we can refer to stuff in other places like SVN
RewriteRule ^docs/\d+.*$ __root/docs.solr.apache.org/$0 [PT]
# Ref-guides up to 8.x
-# Do not index old reference guide pages on search engines, except for pages in 8_11 that don't exist in 9+
-RewriteRule ^guide/8_11/(adding-custom-plugins-in-solrcloud-mode|blob-store-api|blockjoin-faceting|cdcr-api|cdcr-architecture|cdcr-config|cdcr-operations|colocating-collections|cross-data-center-replication-cdcr|dataimport-screen|errata|metrics-history|migrate-to-policy-rule|putting-the-pieces-together|rule-based-replica-placement|solrcloud-autoscaling-api|solrcloud-autoscaling-auto-add-replicas|solrcloud-autoscaling-fault-tolerance|solrcloud-autoscaling-listeners|solrcloud-autoscaling-o [...]
-RewriteRule ^guide/(6|7|8)_\d+.*$ __root/docs.solr.apache.org/$0 [PT,E=oldref:1]
-Header always set X-Robots-Tag "noindex,nofollow,noarchive" env=oldref
-Header always unset X-Robots-Tag env=oldreflastversion
-
+RewriteRule ^guide/(6|7|8)_\d+.*$ __root/docs.solr.apache.org/$0 [PT]
# Ref-guides from 9.0
RewriteRule ^guide/(9_\d+)/?$ guide/solr/$1/ [R=301,L]
RewriteRule ^guide/(_/.+|search-index.js)$ __root/docs.solr.apache.org/$0 [PT]