I've got a Wordpress page that accepts a question string argument:


This works fine. The page will get the need for $_GET['parameter'] properly.

What I wish to do is have the ability to type this like a normal URL:


I want a chance to rewrite the URL therefore the user makes its way into URL 2, and Wordpress will get URL 1. I'm using Apache and would rather do that with mod_rewrite and .htaccess. Any advice?

This can be done within Wordpress making use of your theme's functions.php:

add_action( 'init', 'ss_permalinks' );
function ss_permalinks() {
add_filter( 'query_vars', 'ss_query_vars' );
function ss_query_vars( $query_vars ) {
    $query_vars[] = 'removeid';
    return $query_vars;

Re-save your valuable permalink configurations once after applying. page may be the slug from the page to suggest to once the user access this URL (domain.com/page/remove/432), and $matches[1] ought to be the number after remove/ within the URL. The dpi is obtainable through the variable specified later, $query_vars[] = 'removeid';/ $removeid around the target page's template would be the number within the URL, if specified.