/index/… Custom Permalinks url fix
-
Pliase add some code
in plugin to fix
custom permalink like /index/123/123(if /index/123/123 is custom permalink then plugin fails)
add after (in yours plugin)
$_SERVER[‘REQUEST_URI’] = ‘/’.ltrim($originalUrl,’/’);
$_SERVER[‘QUERY_STRING’] = (($pos=strpos($originalUrl, ‘?’)) !== false ?
substr($originalUrl, $pos+1) : ”);code:
$_SERVER[‘PATH_INFO’] = ‘/’.ltrim($originalUrl,’/’);
or
unset($_SERVER[‘PATH_INFO’]);===============================================================
(WP is parse sometimes PATH_INFO)
class-wp.php
line
if ( ! empty($pathinfo) && !preg_match(‘|^.*’ . $wp_rewrite->index . ‘$|’, $pathinfo) ) {
- The topic ‘/index/… Custom Permalinks url fix’ is closed to new replies.