Replies: 0
Hello, if you need i fix some bug with wilcard :
function redirect() {
…
// don’t allow people to accidentally lock themselves out of admin
if ( strpos($userrequest, ‘/wp-login’) !== 0 && strpos($userrequest, ‘/wp-admin’) !== 0 ) {
// Make sure it gets all the proper decoding and rtrim action
$storedrequest = ‘/^’ . preg_quote(rtrim( $storedrequest, ‘/’ ), ‘/’).’/’;
$pattern = str_replace(‘\*’,'(.*)’,$storedrequest);
$destination = str_replace(‘*’,’$1′,$destination);
$output = preg_replace($pattern, $destination, $userrequest);
if ($output !== $userrequest) {
// pattern matched, perform redirect
$do_redirect = $output;
}
}
….
———————————-
function get_address() {
// return the full address
return this->get_protocol().’://’.$_SERVER[‘HTTP_HOST’].urldecode($_SERVER[‘REQUEST_URI’]);
} // end function get_address
-
This topic was modified 21 seconds ago by
nathannau.