 <p>Try changing this line:</p> <pre><code>RewriteCond %{QUERY_STRING} ^_escaped_fragment_=/?(.*)$ </code></pre> <p>to</p> <pre><code>RewriteCond %{QUERY_STRING} ^_escaped_fragment_=/?([^/]+(?:/[^/]+|)) </code></pre> <p>So the regex will only attempt to capture as many as 2 virtual paths.</p>