title: 301 redirect adds double slash within new URL
body: <p>I am having trouble setting up a 301 redirect within Apache.  I am looking to automatically redirect anyone who visits pages at the old domain to go to the new domain (with one exception: it will not redirect a particular subfolder).  Here is what I have right now:</p>
  
  <pre><code>Options +FollowSymLinks
  RewriteEngine on
  RewriteCond %{REQUEST_URI} !^/subfolder
  RewriteRule ^(.*)$ http://www.newdomain.com/$1 [R=301,L]
  </code></pre>
  
  <p>So right now, the exception works fine - anytime I go to any page under that subfolder such as</p>
  
  <pre><code>http://www.olddomain.com/subfolder/temp_page.html
  </code></pre>
  
  <p>it will maintain the original URL and not redirect, as I wanted.</p>
  
  <p>But when I go to any page outside of that subfolder, the redirect will add a double slash to the new URL.  For example, if I go to</p>
  
  <pre><code>http://www.olddomain.com/temp_page.html
  </code></pre>
  
  <p>it will redirect it to</p>
  
  <pre><code>http://www.newdomain.com//temp_page.html
  </code></pre>
  
  <p>I have tried various suggested fixes on here and other sites - but nothing seems to be working.  Any help you could pass along my way would be greatly appreciated.  Thanks in advance!</p>