A rewriting engine cannot run a single HTTP request twice . It sends an HTTP request for Apache to either a static file, or a proxy function, or to a module (e.g. PHP) with a request change. But he cannot clone the request and give it 2 times apache.
If you have a βrun twiceβ problem, it is likely that you hit the empty URL of the image URL . In fact, this is not a mistake in the HTML version (at least until HTML5) and the features of url analysis.
If you get an empty GET url somewhere, HTML indicates that the browser should re-send the same request (the one that gave it the current page) with the same parameters. This can be done with a POST request 2 times (if the requested 1st page was POST). So where are these empty get url? In most cases, you get:
<IMG SRC="" ...> (in the HTML)
or
url() (in the css)
or
<script type="text/javascript" src=""></script> <link rel="stylesheet" type="text/css" href=""> (in the HTML headers)
Read also @Jon answer favicon request. You should always check the result without browser behavior using wget or telnet requests.
Update: The detailed explanations and observations available on this blog with HTML5 add-ons that should remove this behavior for modern browsers.
source share