You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by iv...@apache.org on 2026/10/16 09:43:56 UTC
svn commit: r1939149 - subversion/site/staging
Author: ivan
Date: Fri Oct 16 09:43:56 2026
New Revision: 1939149
Log:
In site/staging: Try to implement INFRA suggestion to hide subversion-staging site
from indexing via .htaccess. See INFRA-28512.
NOTE: This changes **should not** merged to publish.
.htaccess: Add `Header set X-Robots-Tag "noindex, nofollow"`.
[1]: https://issues.apache.org/jira/browse/INFRA-28512
Modified:
subversion/site/staging/.htaccess
Modified: subversion/site/staging/.htaccess
==============================================================================
--- subversion/site/staging/.htaccess Fri Oct 16 09:38:10 2026 (r1939148)
+++ subversion/site/staging/.htaccess Fri Oct 16 09:43:56 2026 (r1939149)
@@ -14,3 +14,7 @@ RedirectMatch permanent ^/issue-tracker(
RedirectMatch ^/issue[^A-Za-z0-9]?(\d+)$ https://issues.apache.org/jira/browse/SVN-$1
RewriteRule ^/?download(\.html)?/?$ /download.cgi [PT]
+# Staging site only
+<IfModule mod_headers.c>
+ Header set X-Robots-Tag "noindex, nofollow"
+</IfModule>
Re: svn commit: r1939149 - subversion/site/staging
Posted by Ivan Zhakov <iv...@apache.org>.
On Fri, 16 Oct 2026 at 12:04, Daniel Sahlberg <da...@gmail.com>
wrote:
> A little late to the party but would it also make sense to add a
> robots.txt file? I realise they work in slightly different ways.
> [[[
> User-agent: *
> Disallow: /
> ]]]
>
> I would be nice too, but IMHO X-Robots-Tag is sufficient. With robots.txt
we will have the same problem how to maintain the different robots.txt for
different branches. Probably we can implement it via conditional Rewrite
rule.
> How about --record-only "merging" these differences in publish to
> prevent accidental merge? (I saw the later SERVER_NAME commit but we
> might prevent it from even appearing in publish).
>
> I thought about --record-only merge to block revision from merging to
publish, but I think it would be error prone:
1. We will have to maintain record-only merge for any changes in
'subversion-staging' specific area in staging/.htaccess.
2. It will be easy to miss blocking such changes and accidently to apply
"noindex, nofollow" change to publish.
I am going to confirm with INFRA team that SERVER_NAME approach is proper
solution and then test it on subversion.apache.org (publish).
--
Ivan Zhakov
Re: svn commit: r1939149 - subversion/site/staging
Posted by Branko Čibej <br...@apache.org>.
On 16. 10. 2026 12:03, Daniel Sahlberg wrote:
> A little late to the party but would it also make sense to add a
> robots.txt file? I realise they work in slightly different ways.
> [[[
> User-agent: *
> Disallow: /
> ]]]
>
> How about --record-only "merging" these differences in publish to
> prevent accidental merge? (I saw the later SERVER_NAME commit but we
> might prevent it from even appearing in publish).
If we can make sure that SERVER_NAME is definitely set as expected, then
this can and should be merged to .../publish. Maintaining a file only on
one branch, as in the case of your robots.txt proposal, will surely blow
up on us sometime in the future. Using --record-only then modifying the
file on the staging branch will cause a conflict on a future merge to
the publish branch.
However, I find this change problematic:
# Staging site only
-<IfModule mod_headers.c>
+<If "%{SERVER_NAME} == 'subversion-staging.apache.org'">
Header set X-Robots-Tag "noindex, nofollow"
-</IfModule>
+</If>
The logic should be inverted so that we only allow indexing on the main
site, not only disallow it on the staging site. Who knows what branches
we'll create in future.
I'm guessing the <IfModule> condition was removed in order to fail hard
and fast if the module isn't enabled, so that's fine.
-- Brane
> Den fre 16 okt. 2026 kl 11:43 skrev<iv...@apache.org>:
>> Author: ivan
>> Date: Fri Oct 16 09:43:56 2026
>> New Revision: 1939149
>>
>> Log:
>> In site/staging: Try to implement INFRA suggestion to hide subversion-staging site
>> from indexing via .htaccess. See INFRA-28512.
>>
>> NOTE: This changes **should not** merged to publish.
>>
>> .htaccess: Add `Header set X-Robots-Tag "noindex, nofollow"`.
>>
>> [1]:https://issues.apache.org/jira/browse/INFRA-28512
>>
>> Modified:
>> subversion/site/staging/.htaccess
>>
>> Modified: subversion/site/staging/.htaccess
>> ==============================================================================
>> --- subversion/site/staging/.htaccess Fri Oct 16 09:38:10 2026 (r1939148)
>> +++ subversion/site/staging/.htaccess Fri Oct 16 09:43:56 2026 (r1939149)
>> @@ -14,3 +14,7 @@ RedirectMatch permanent ^/issue-tracker(
>> RedirectMatch ^/issue[^A-Za-z0-9]?(\d+)$https://issues.apache.org/jira/browse/SVN-$1
>> RewriteRule ^/?download(\.html)?/?$ /download.cgi [PT]
>>
>> +# Staging site only
>> +<IfModule mod_headers.c>
>> + Header set X-Robots-Tag "noindex, nofollow"
>> +</IfModule>
>>
Re: svn commit: r1939149 - subversion/site/staging
Posted by Daniel Sahlberg <da...@gmail.com>.
A little late to the party but would it also make sense to add a
robots.txt file? I realise they work in slightly different ways.
[[[
User-agent: *
Disallow: /
]]]
How about --record-only "merging" these differences in publish to
prevent accidental merge? (I saw the later SERVER_NAME commit but we
might prevent it from even appearing in publish).
Kind regards,
Daniel
Den fre 16 okt. 2026 kl 11:43 skrev <iv...@apache.org>:
>
> Author: ivan
> Date: Fri Oct 16 09:43:56 2026
> New Revision: 1939149
>
> Log:
> In site/staging: Try to implement INFRA suggestion to hide subversion-staging site
> from indexing via .htaccess. See INFRA-28512.
>
> NOTE: This changes **should not** merged to publish.
>
> .htaccess: Add `Header set X-Robots-Tag "noindex, nofollow"`.
>
> [1]: https://issues.apache.org/jira/browse/INFRA-28512
>
> Modified:
> subversion/site/staging/.htaccess
>
> Modified: subversion/site/staging/.htaccess
> ==============================================================================
> --- subversion/site/staging/.htaccess Fri Oct 16 09:38:10 2026 (r1939148)
> +++ subversion/site/staging/.htaccess Fri Oct 16 09:43:56 2026 (r1939149)
> @@ -14,3 +14,7 @@ RedirectMatch permanent ^/issue-tracker(
> RedirectMatch ^/issue[^A-Za-z0-9]?(\d+)$ https://issues.apache.org/jira/browse/SVN-$1
> RewriteRule ^/?download(\.html)?/?$ /download.cgi [PT]
>
> +# Staging site only
> +<IfModule mod_headers.c>
> + Header set X-Robots-Tag "noindex, nofollow"
> +</IfModule>
>