title: How to target urls with specific characters in a query string for htaccess redirects
body: <p>I have a site that was converted to ExpressionEngine from a different blog platform, and I'm getting a bunch of crawl errors from previously indexed urls that now lead to an error page because ExpressionEngine doesn't allow certain characters in urls.</p>
  
  <p>The urls that are causing the errors follow one of three patterns:</p>
  
  <pre><code>http://www.example.com/general/404/?404%3Bhttp://old.example.com:80/old-blog/random/segments
  </code></pre>
  
  <p>or</p>
  
  <pre><code>http://www.example.com/blog/?404%3Bhttp://old.example.com:80/old-blog/random/segments
  </code></pre>
  
  <p>or </p>
  
  <pre><code>http://www.example.com/blog/Default.aspx?404;http://old.example.com:80/old-blog/random/segments
  </code></pre>
  
  <p>I was able to redirect the urls from the third example using this code:</p>
  
  <pre><code>RewriteRule ^blog/Default.aspx?/?$ http://www.example.com/general/404/? [L,R=301]
  </code></pre>
  
  <p>Is there a way I can intercept the other URLS with htaccess before they hit EE and redirect them to my 404 page: http:www.example.com/general/404/? I'm not sure how to target them specifically since there is nothing before the ? in the query string url segment.</p>