hello
Server : Apache/2.4.52 (Ubuntu) System : Linux HAN2 5.15.0-185-generic #195-Ubuntu SMP Fri Jun 19 17:11:50 UTC 2026 x86_64 User : servadmin ( 1000) PHP Version : 8.1.2-1ubuntu2.25 Disable Function : NONE Directory : /www/docs/www.obusignal.com/www.obusignal.com/wp-content/plugins/redirection/matches/ |
<?php
require_once __DIR__ . '/http-header.php';
/**
* Check that a cookie value exists
*/
class Cookie_Match extends Header_Match {
public function name() {
return __( 'URL and cookie', 'redirection' );
}
public function is_match( $url ) {
if ( $this->regex ) {
$regex = new Red_Regex( $this->value, true );
$cookie = Redirection_Request::get_cookie( $this->name );
if ( $cookie === false ) {
return false;
}
return $regex->is_match( $cookie );
}
return Redirection_Request::get_cookie( $this->name ) === $this->value;
}
}