Apache 2.2.19 rewritten path repeating
<p>When rewriting a URL from HTTP to HTTPS, Apache is repeating the matched path multiple times - how can it be stopped?</p>

<p>Eg: URL
<code>example.com/test/</code></p>

<p>Output URL
<code>example.com/testtesttesttesttesttesttest/</code></p>

<p>Rewrite Rules Used</p>

<pre><code>RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*)$ https://%{SERVER_NAME}/$1 [R,L]
</code></pre>

<p>Apache version 2.2.19
Server Windows 2003r2</p>