Dr0ptp4kt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/64629


Change subject: Instruct robots to stop indexing zero.wikipedia.org and its 
subdomains.
......................................................................

Instruct robots to stop indexing zero.wikipedia.org and its subdomains.

Change-Id: I63a4542c9792e4979f2a9668d0a5c858f21f591b
---
M w/robots.php
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/29/64629/1

diff --git a/w/robots.php b/w/robots.php
index af697e9..9376812 100644
--- a/w/robots.php
+++ b/w/robots.php
@@ -16,13 +16,15 @@
 $robots = fopen( $robotsfile, 'rb' );
 $text = '';
 
+$zeroRated = isset( $_SERVER['HTTP_X_SUBDOMAIN'] ) && 
$_SERVER['HTTP_X_SUBDOMAIN'] === 'ZERO';
+
 header( 'Cache-Control: s-maxage=3600, must-revalidate, max-age=0' );
 
 if ( $wgArticle->getID() != 0 ) {
        $text =  $wgArticle->getContent( false ) ;
        $lastmod = gmdate( 'D, j M Y H:i:s', wfTimestamp( TS_UNIX,  
$wgArticle->getTouched() ) ) . ' GMT';
        header( "Last-modified: $lastmod" );
-} elseif( $wmfRealm == 'labs' ) {
+} elseif( $wmfRealm == 'labs' || $zeroRated ) {
        echo "User-agent: *\nDisallow: /\n";
 } else {
        $stats = fstat( $robots );

-- 
To view, visit https://gerrit.wikimedia.org/r/64629
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I63a4542c9792e4979f2a9668d0a5c858f21f591b
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Dr0ptp4kt <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to