I created a plugin called Parameters to do just this, but here is an even simpler trick for EE2 (the same will work in 1.6 too, just assign it in your path.php file)
In the root index.php file, update the $assign_to_config variable to the following:
$req_uri = $_SERVER['REQUEST_URI'];
$assign_to_config['global_vars'] = array(
'disabled_params' => 'trackbacks|pagination',
'disabled_params_strict' => 'trackbacks|pagination|member_data|category_fields',
'disabled_params_all' => 'trackbacks|pagination|member_data|category_fields|categories|custom_fields',
'get:category' => preg_match("~category=(.*)$~", $req_uri, $matches) ? $matches[1] : NULL,
'get:year' => preg_match("~year=(.*)$~", $req_uri, $matches) ? $matches[1] : NULL,
'get:month' => preg_match("~month=(.*)$~", $req_uri, $matches) ? $matches[1] : NULL,
); // This array must be associativeNow you use {get:myvar} anywhere in your templates, even in template tags or conditionals, e.g. {if get:myvar}
The only side effect to this is you have to know what $_GET variables you’re expecting. I haven’t found a way to create a loop to get any GET or POST var and make it work, b/c if you put {get:foobar} into the template, and $_POST[‘foobar’] is not present, then the template will just display {get:foobar} and not parse it as a blank/false variable.
Note that since we’re going directly to the REQUEST_URI this will work with any server configuration, and you don’t have to worry about that pesky .htaccess rule.