[wp-hackers] Rewrite URIs Hack

Seamus Leahy leahy at au.org
Mon Nov 20 15:34:57 GMT 2006


Sorry, here is the code in more readable form:

wp-settings.php:
...
if ( ! isset($blog_id) )
    $blog_id = 1; 
// START HACK 
// Fix for rewritten URIS with mod rewrite
if(!empty($_SERVER["REDIRECT_QUERY_STRING"])
   && !empty($_SERVER["REDIRECT_URL"])
   && $_SERVER["REDIRECT_URL"] == "/index.php"){
    $_SERVER['REQUEST_URI'] = "/index.php";
} 
// END HACK 

//Fix for IIS, which doesn't set REQUEST_URI if ( empty(
$_SERVER['REQUEST_URI'] ) ) {
...



Seamus.
leahy at au.org | x220



More information about the wp-hackers mailing list