Get rewrite result

Quick simple question. How would I get the result of a rewrite in wordpress?

For example I have:

How would I get the end result that WP processes? Aka, the


Solutions Collecting From Web of "Get rewrite result"

Have a look at the Action Reference to see generally how requests are processed. After all the loading and init stuff happens, the parse_request action runs when the request is matched against the rewrite rules, and an object is passed containing all the registered query vars and the matched rule and query string.

function wpd_parse_request( $request ){
    echo $request->matched_query;
add_action( 'parse_request', 'wpd_parse_request' );

After the wp action runs, that same object is stashed in the wp global.

global $wp;
echo $wp->matched_query;

Use the function get_query_var: WordPress Codex Function Reference for get query var

$someVariable = get_query_var('paramter1');