title: Rewriting a URL causing a 400 Bad Request
body: <p>I'm trying to get around an HTTP 400 Bad Request with Apache that is caused when this URL is accessed (actual domain redacted):</p>
  
  <p><code>http://example.com/nw/f/RUD/E.enc&lt;space&gt;</code></p>
  
  <p>The URL ends with an actual space character, thus giving an HTTP 400 Bad Request. I cannot get the clients requesting this to remove the space in the URL, so I need to rewrite the URL without a space.</p>
  
  <p>I've tried some RewriteRules, like this one (after enabling the RewriteEngine):</p>
  
  <p><code>RewriteRule "^/nw/f/RUD/E(.*)$" /nw/f/RUD/E.enc [P]</code></p>
  
  <p>The RewriteRule has no effect and is still giving an HTTP 400.</p>
  
  <p>It even happens when I escape the space character instead of using the wildcard in the rule. Same thing if I try to replace the HTTP 400 error page to lead to the actual content (which wouldn't be ideal, since there's 4 different files).</p>
  
  <p>How can I correctly rewrite the URL, removing the space on it, without getting HTTP 400?</p>