Making WordPress.org

Changeset 13050


Ignore:
Timestamp:
12/12/2023 03:07:20 AM (4 months ago)
Author:
dd32
Message:

Redirects: Temporarily redirect w.org/playground to the correct location.

This is a 302 as the playground will be available at this url directly in the future.

See https://wordpress.slack.com/archives/C02QB8GMM/p1702348887775449
See https://github.com/WordPress/wporg-main-2022/issues/355

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/mu-plugins/pub/wporg-redirects.php

    r13044 r13050  
    5757                // Data Liberation
    5858                '/and' => '/data-liberation/',
     59
     60                // Playground, temporarily.
     61                '/playground' => [ 302, 'https://developer.wordpress.org/playground/' ]
    5962            ];
    6063
    6164            foreach ( $path_redirects as $test => $redirect ) {
    6265                if ( 0 === strpos( $_SERVER['REQUEST_URI'], $test ) ) {
     66
     67                    $code = 301;
     68                    if ( is_array( $redirect ) ) {
     69                        list( $code, $redirect ) = $redirect;
     70                    }
    6371
    6472                    // override nocache_headers();
     
    6674                    header_remove( 'cache-control' );
    6775
    68                     wp_safe_redirect( $redirect, 301 );
     76                    wp_safe_redirect( $redirect, $code );
    6977                    exit;
    7078                }
Note: See TracChangeset for help on using the changeset viewer.