Search squid archive

Re: redirect based on User Agent ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 11, 2005 at 01:04:02PM +0200, Len Kranendonk wrote:
> We're using multiple squids in http accelerator mode to speed up a high
> traffic website.
> At the moment we're working on a site for mobile / pda browsers.
> 
> I'd like to redirect mobile users to an alternate URL. 
> Is there a way to led squid handle the redirects based on User Agent ? 

Do you mean something like this?

acl blackberry browser Blackberry
acl windowsce browser Windows.CE
acl symbian browser Symbian
redirect_program /usr/local/bin/myredirector
redirector_access allow blackberry
redirector_access allow windowsce
redirector_access allow symbian

This page might help you with constructing regexes to use:
http://www.zytrax.com/tech/web/mobile_ids.html

Alternatively, you might find it more flexible to do this in the application.
That'll allow you to handle many more special cases than Squid will.
Looking at the variegated browser strings, I suspect there'll be plenty
of gotchas.

Regards
Joshua.

-- 
Joshua Goodall                           "as modern as tomorrow afternoon"
joshua@xxxxxxxxxxxxxx                                       - FW109

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux