[wp-trac] Re: [WordPress Trac] #3514: IIS fix for get_pagenum_link
WordPress Trac
wp-trac at lists.automattic.com
Thu May 31 23:08:36 GMT 2007
#3514: IIS fix for get_pagenum_link
---------------------------------------------------+------------------------
Reporter: snakefoot | Owner: markjaquith
Type: defect | Status: assigned
Priority: high | Milestone: 2.3
Component: General | Version: 2.0
Severity: major | Resolution:
Keywords: get_pagenum_link, iis, posts_nav_link |
---------------------------------------------------+------------------------
Comment (by snakefoot):
Corrected some bugs in the plugin:
{{{
function fix_request_uri()
{
global $is_IIS;
global $wp_rewrite;
if (!$is_IIS)
return;
if ($wp_rewrite->using_index_permalinks())
{
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] .
$_SERVER['PATH_INFO'];
}
else if ($wp_rewrite->using_permalinks())
{
// SCRIPT_NAME includes script-path + script-filename
(remove the filename) and append request-path PATH_INFO
$_SERVER['REQUEST_URI'] = substr($_SERVER['SCRIPT_NAME'],
0, strrpos($_SERVER['SCRIPT_NAME'], '/')) . $_SERVER['PATH_INFO'];
}
else
{
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'];
}
// Append the query string if it exists and isn't null
if (isset($_SERVER['QUERY_STRING']) &&
!empty($_SERVER['QUERY_STRING']))
{
$_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
}
}
}}}
--
Ticket URL: <http://trac.wordpress.org/ticket/3514#comment:11>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list