title: Website shows 502 only on some pages
body: <p>On this site: </p>
  
  <p><a href="http://www.seleconlight.com" rel="nofollow">http://www.seleconlight.com</a></p>
  
  <p>everything is fine</p>
  
  <p>On this url:</p>
  
  <p><a href="http://www.seleconlight.com/index.php?option=com_virtuemart&amp;page=shop.product_details&amp;flypage=shop.flypage.p3&amp;category_id=8&amp;product_id=21" rel="nofollow">http://www.seleconlight.com/index.php?option=com_virtuemart&amp;page=shop.product_details&amp;flypage=shop.flypage.p3&amp;category_id=8&amp;product_id=21</a></p>
  
  <p>most people get an error 502 bad request.
  - I do not get that error from my home DSL connection, and the site is in a data center
  - I get an error on my smartphone, webpagetest.org and websitepulse.com
  - None of these clients appear in the web server's apache log.</p>
  
  <p>Normally a Bad gateway error indicates a network in between? How can this be for some pages, but not for others?</p>
  
  <p>On further investigation I found a page that can be reproduced to cause the error, even with  the offending code removed:</p>
  
  <pre><code>http://www.seleconlight.com//index.php?option=com_virtuemart&amp;page=shop.product_details&amp;flypage=flypage.p1&amp;category_id=121&amp;product_id=74
  </code></pre>
  
  <p>I have the following test details with Webpagetest:</p>
  
  <p><a href="http://www.webpagetest.org/result/130122_BZ_12S8/1/details/" rel="nofollow">http://www.webpagetest.org/result/130122_BZ_12S8/1/details/</a> shows a 502 error</p>
  
  <p>Details show:</p>
  
  <pre><code>URL: http://www.seleconlight.com//index.php?option=com_virtuemart&amp;page=shop.product_details&amp;flypage=flypage.p1&amp;category_id=121&amp;product_id=74
  Host: www.seleconlight.com
  IP: 23.62.236.155
  Error/Status Code: 502
  Initiated By: 
  Start Offset: 0.214 s
  DNS Lookup: 159 ms
  Initial Connection: 54 ms
  Time to First Byte: 1675 ms
  Bytes In (downloaded): 0.2 KB
  Bytes Out (uploaded): 0.5 KB
  Request Headers:
  
  GET //index.php?option=com_virtuemart&amp;page=shop.product_details&amp;flypage=flypage.p1&amp;category_id=121&amp;product_id=74 HTTP/1.1
  Accept: image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, */*
  Accept-Language: en-US
  User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; PTST 2.345)
  Accept-Encoding: gzip, deflate
  Host: www.seleconlight.com
  Connection: Keep-Alive
  Response Headers:
  
  HTTP/1.1 502 Bad Gateway
  Content-Length: 0
  Expires: Tue, 22 Jan 2013 23:15:58 GMT
  Cache-Control: max-age=0, no-cache, no-store
  Pragma: no-cache
  Date: Tue, 22 Jan 2013 23:15:58 GMT
  Connection: keep-alive
  
  Note the IP address is 23.62.236.155, reverse DNS: a23-62-236-155.deploy.akamaitechnologies.com whereas the domain is actually on 120.138.27.252
  </code></pre>