title: Regex for url-encoded string in .htaccess
body: <p>I have to addresses for one site (different langs) and I need a redirect with saving query string. So I need to catch this </p>
  
  <pre><code>http://www.example1.kereell.com/wp-login.php?action=logout&amp;redirect_to=http%253A%252F%252Fwww.example2.kereell.com%252Fafiliados-de-la-zona%252F&amp;_wpnonce=66909cdca0
  </code></pre>
  
  <p>and redirect to </p>
  
  <pre><code>http://www.example2.kereell.com/wp-login.php?action=logout&amp;redirect_to=http%253A%252F%252Fwww.example2.kereell.com%252Fafiliados-de-la-zona%252F&amp;_wpnonce=66909cdca0
  </code></pre>
  
  <p>in .htaccess file it should be something like this</p>
  
  <pre><code>RewriteCond %{HTTP_HOST} ^.*example1\.kereell\.com$ [NC]
  RewriteCond %{REQUEST_URI} ^/wp-login.php?action=logout&amp;redirect_to=http%3A%2F%2Fwww.example2.kereell.com%2Fafiliados-de-la-zona%2F&amp;_wpnonce=66909cdca0$ [NC]
  RewriteRule ^(.*)$ http://www.example2.kereell.com/$1 [R=301,L] 
  </code></pre>
  
  <p>I tried a lot of everything (escaping "%", regex classes) but didn't get it to work because of urlencoded characters. If I replace all urlencoded symbols - it works..</p>