title: htaccess regex - is there any way to capture encoded urls?
body: <p>I need to capture URLs that have any characters that could be encoded. For example +, {space}, [,] etc. I tired doing the following but did not work - </p>
  
  <pre><code>RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} ^(.*)(\s|\+|\%)+(.*)$
  RewriteRule ^(.*)$ /content/my-rewrite-redirect.php [L]
  RewriteCond %{HTTPS} off
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ http://mydomain.com/content/$1$1 [QSA,L]
  RewriteCond %{HTTPS} on
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ https://mydomain.com/content/$1 [QSA,L]
  </code></pre>
  
  <p>(\s|+|\%) - tried this to capture space characters and any character that has been encoded in the URL but it does not capture URLs like - <a href="http://mydomain.com/vertical%5B1%5D.jpg" rel="nofollow">http://mydomain.com/vertical%5B1%5D.jpg</a></p>
  
  <p>Thansk for your time. </p>