Redirect 301 for URLs with same parameter, different values, different targets
<p>This mod_rewrite works for one URL - /blog/ - I have to target:</p>

<pre><code>RewriteEngine on
RewriteCond %{QUERY_STRING} ^pagenumber=([0-9]*)$
RewriteRule (.*) /blog/? [R=301,L]
</code></pre>

<p>The issue I have is that <code>pagenumber</code> can be 2, 3, 4, and so on for a number of different query URLs, such as:</p>

<pre><code>/blog?pagenumber=2
/blog?pagenumber=3
/blog?pagenumber=4

/corp?pagenumber=2
/corp?pagenumber=3

/new-1?pagenumber=2
</code></pre>

<p>Is it possible to create a RewriteCond such as:</p>

<pre><code>^/blog(^\?)pagenumber=([0-9]*)$ http://www.domain.com/blog/? 
</code></pre>

<p>that I can reuse for each individual URL  (/blog/, /corp/, etc.)?</p>

<p>(I'm certain that example is not right, but wanted to get the idea across...)</p>

<p>Or is there another, simpler way that I am missing?</p>

<p>Any help that anyone can provide would be most appreciated.</p>

<p>Thank you!</p>

<p>Bryan</p>