title: Redirect loop on attempted web proxy
body: <p>I have an Apache server running WordPress in the web root (<code>/var/www/html</code>). In my access_log I have been seeing many entries of the form:</p>
  
  <pre><code>98.209.16.114 - - [15/Feb/2013:21:19:51 -0500] "GET http://www.twitter.com HTTP/1.1" 301 - "-" "curl/7.28.1"
  98.209.16.114 - - [15/Feb/2013:21:19:51 -0500] "GET http://www.twitter.comhttp/www.twitter.com HTTP/1.1" 301 - "-" "curl/7.28.1"
  98.209.16.114 - - [15/Feb/2013:21:19:51 -0500] "GET http://www.twitter.comhttphttp/www.twitter.comhttp/www.twitter.com HTTP/1.1" 301 - "-" "curl/7.28.1"
  98.209.16.114 - - [15/Feb/2013:21:19:52 -0500] "GET http://www.twitter.comhttphttphttp/www.twitter.comhttphttp/www.twitter.comhttp/www.twitter.com HTTP/1.1" 301 - "-" "curl/7.28.1"
  </code></pre>
  
  <p>where <code>www.twitter.com</code> can be replaced with any number of odd domains external to my own.</p>
  
  <p>EDIT: the copied lines include curl because I was testing this phenomenon from my own command line.</p>
  
  <p>The pertinent lines in my <code>httpd.conf</code> file are:</p>
  
  <pre><code>NameVirtualHost *:80
  
  &lt;VirtualHost *:80&gt;
    DocumentRoot /var/www/html
    ServerName www.mydomain.com
    &lt;Directory /var/www/html&gt;
      AllowOverride All
    &lt;/Directory&gt;
  &lt;/VirtualHost&gt;
  
  &lt;VirtualHost *:80&gt;
    ServerName mydomain.com
    RewriteEngine On
    RewriteRule ^/(.*) http://www.mydomain.com/$1 [L,R=301]
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>and the <code>.htaccess</code> file in the WordPress directory looks like:</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.php [L]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>This happens tens of times per day. A few questions I have are:</p>
  
  <ul>
  <li>Should I be worried about so many proxy attempts? I've turned off mod_proxy and while http requests are looping, https requests seem to return either <code>301</code> or <code>400</code></li>
  <li>Is there any sort of performance loss I should be worried about?</li>
  <li>How do I fix the darn thing?</li>
  </ul>
  
  <p>Let me know what other information you need.</p>