diff --git a/src/Handlers/Comment.php b/src/Handlers/Comment.php index f6f43397..363a2c41 100644 --- a/src/Handlers/Comment.php +++ b/src/Handlers/Comment.php @@ -56,7 +56,7 @@ public static function process( array $comment ): array { $comment['comment_author_IP'] = IpHelper::get_client_ip(); - $request_uri = isset( $_SERVER['REQUEST_URI'] ) ? esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : null; + $request_uri = isset( $_SERVER['SCRIPT_NAME'] ) ? esc_url_raw( wp_unslash( $_SERVER['SCRIPT_NAME'] ) ) : null; $request_path = DataHelper::parse_url( $request_uri, 'path' ); if ( empty( $request_path ) ) {