Cache the redirect from index.php to the start page (default: Main_Page)
authorJens Frank <jeluf@users.mediawiki.org>
Mon, 10 Jan 2005 21:04:20 +0000 (21:04 +0000)
committerJens Frank <jeluf@users.mediawiki.org>
Mon, 10 Jan 2005 21:04:20 +0000 (21:04 +0000)
index.php

index 7f58774..58a794b 100644 (file)
--- a/index.php
+++ b/index.php
@@ -82,6 +82,7 @@ if( !$wgDisableInternalSearch && !is_null( $search ) && $search !== '' ) {
        !count( array_diff( array_keys( $_GET ), array( 'action', 'title' ) ) ) )
 {
        /* redirect to canonical url, make it a 301 to allow caching */
+       $wgOut->setSquidMaxage( 1200 );
        $wgOut->redirect( $wgTitle->getFullURL(), '301');
 } else if ( Namespace::getSpecial() == $wgTitle->getNamespace() ) {
        # actions that need to be made when we have a special pages