Source From: 'exact']; $url_redirect_to = ''; $http_code = '301'; $status = 'active'; $uri = ''; $get_data = metasync_sanitize_input_array($_GET); if (isset($get_data['action'])) { if (isset($get_data['uri']) && ($get_data['action'] == 'redirect' && !empty($get_data['uri']))) { // Decode the URI and sanitize it properly $uri = urldecode($get_data['uri']); $uri = sanitize_text_field($uri); // Ensure URI starts with / if (!str_starts_with($uri, '/')) { $uri = '/' . $uri; } } if (isset($get_data['id']) && $get_data['action'] == 'edit') { // Get database instance $db_instance = isset($this) && isset($this->db_redirection) ? $this->db_redirection : null; if ($db_instance) { $record = $db_instance->find(intval($get_data['id'])); if ($record) { $id = isset($record->id) ? esc_attr($record->id) : ''; $source_form = isset($record->sources_from) && $record->sources_from ? unserialize($record->sources_from, ['allowed_classes' => false]) : []; // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.serialize_unserialize $url_redirect_to = isset($record->url_redirect_to) ? esc_attr($record->url_redirect_to) : ''; $http_code = isset($record->http_code) ? esc_attr($record->http_code) : ''; $status = isset($record->status) ? esc_attr($record->status) : ''; } } } } $search_type = [ ['name' => 'Exact Match', 'value' => 'exact'], ['name' => 'Starts With', 'value' => 'start'], ['name' => 'Ends With', 'value' => 'end'], ['name' => 'Wildcard (*)', 'value' => 'wildcard'], ['name' => 'Regex Pattern', 'value' => 'regex'], ]; ?>
    $source_type) { ?>
', esc_attr($id)); printf(' '); ?>
Destination URL:
Redirection Type:
Description:

Optional description to help identify this redirection rule.

Status: