[wp-hackers] Rewrite URIs Hack

Seamus Leahy leahy at au.org
Tue Nov 21 14:51:41 GMT 2006


Linux with Apache.


On 11/20/06 2:46 PM, "Computer Guru" <computerguru at neosmart.net> wrote:

> Hi Seamus...
> 
> Are you on Windows or Linux? IIS or Apache?
> 
> On 11/20/06, Seamus Leahy <leahy at au.org> wrote:
>> 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
>> 
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>> 
> 

Seamus.
leahy at au.org | x220



More information about the wp-hackers mailing list