HEX
Server: Apache
System: Linux s198.coreserver.jp 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC 2025 x86_64
User: nagasaki (10062)
PHP: 7.1.33
Disabled: NONE
Upload Files
File: /virtual/nagasaki/public_html/wp-content/plugins/redirection/matches/cookie.php
<?php

include_once dirname( __FILE__ ) . '/http-header.php';

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 );
			return $regex->is_match( Redirection_Request::get_cookie( $this->name ) );
		}

		return Redirection_Request::get_cookie( $this->name ) === $this->value;
	}
}