Re: [squid-users] Fwd: Url redirection to ip

From: Michael Alger <squid_at_mm.quex.org>
Date: Thu, 17 Jul 2008 14:14:05 +0800

On Wed, Jul 16, 2008 at 08:37:49PM -0400, jason bronson wrote:
> hmm well i've been trying to debug this it's weird if thiers a 404
> it traverses through out the next several requests
> example notice this request was ok directly to the image
> 1216254753.708 286 10.108.3.22 TCP_REFRESH_HIT/304 235 GET
> http://10.108.111.181/loginuat/images/header_rightcorner.jpg -
> FIRST_UP_PARENT/uatbox -

> Now notice i use the main url
> 1216254757.937 511 10.108.3.22 TCP_MISS/200 4171 GET
> http://10.108.111.181/loginuat/ - FIRST_UP_PARENT/uatbox text/html
>
> Images wont use the /loginuat/ like the rest? weird?

It's not weird, it just means your page on /loginuat/ is serving
HTML with references to images that look like
"/images/header_rightcorner.jpg" instead of
"/loginuat/images/header_rightcorner.jpg".

> 1216254758.290 185 10.108.3.22 TCP_MISS/404 752 GET
> http://10.108.111.181/images/header_rightcorner.jpg -
> FIRST_UP_PARENT/mybox text/html
> 1216254758.291 113 10.108.3.22 TCP_MISS/404 751 GET
> http://10.108.111.181/images/massinsectionlogo.gif -
> FIRST_UP_PARENT/mybox text/html
>
> css works fine in /css folder? and js too but just not images ? is
> this a bug

No bug, it's doing exactly what you told it to -- any requests for a
path that starts with /loginuat/ are being sent to your UAT server,
while everything else is going to your default server (mybox).

You need to either modify your UAT server to make sure its references
are either relative or start with /loginuat/, or also pass requests for
/images/ to the UAT server.

Alternatively you might be able to solve this through some complex URL
rewriting rules, but that's almost always the wrong solution.
Received on Thu Jul 17 2008 - 06:14:10 MDT

This archive was generated by hypermail 2.2.0 : Thu Jul 17 2008 - 12:00:03 MDT