title: Redirect URL with an 'www.abcd.com/?page_id=XXX' format in WordPress 4.4.2 - Apache 2.4.12
body: <p>I have redesigned an entire WordPress website and while setting up 301 in my .htaccess file I was enable to redirect URLs with the following format:</p>
  
  <p>www.abcd.com/?page_id=XXX</p>
  
  <p>I have tried two things:</p>
  
  <p><strong>Number 1</strong></p>
  
  <pre><code>RewriteEngine On
  RedirectRule %{QUERY_STRING} page_id=XXX
  Redirect 301 oldpage.php newpage.php
  </code></pre>
  
  <p><strong>Number 2</strong></p>
  
  <pre><code>RewriteCond %{QUERY_STRING} ^id=XXX$
  RewriteRule ^page.php$ http://www.example.com/content/page? [R=301,L]
  </code></pre>
  
  <p>None of these worked. I don't have any problems redirecting the other URLs with a 'www.abcd.com/xxxxx format though. The problem is just with 'www.abcd.com/?page_id=XXX' URLs.</p>
  
  <p>I also spent a good amount of time reading through the apache website.</p>