ALT Linux Community general discussions
 help / color / mirror / Atom feed
* [Comm] SQUID
@ 2003-03-14 10:46 Oleg
  2003-03-14 10:59 ` Maxim Tyurin
  2003-03-14 11:05 ` Maxim.Savrilov
  0 siblings, 2 replies; 3+ messages in thread
From: Oleg @ 2003-03-14 10:46 UTC (permalink / raw)
  To: community

Hello community,

  Можно ли заставить squid
  не просто вырезать баннеры,
  а подставлять на их место какую-нибудь свою картинку?

-- 
Best regards,
 Oleg                          mailto:wacom@narod.ru



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Comm] SQUID
  2003-03-14 10:46 [Comm] SQUID Oleg
@ 2003-03-14 10:59 ` Maxim Tyurin
  2003-03-14 11:05 ` Maxim.Savrilov
  1 sibling, 0 replies; 3+ messages in thread
From: Maxim Tyurin @ 2003-03-14 10:59 UTC (permalink / raw)
  To: community

On Fri, Mar 14, 2003 at 01:46:24PM +0300, Oleg wrote:
> Hello community,
> 
>   Можно ли заставить squid
>   не просто вырезать баннеры,
>   а подставлять на их место какую-нибудь свою картинку?
Использовать перенаправление. 
Готовый -  sleezeball
-- 

With Best Regards, Maxim Tyurin
mailto: MrKooll@mail.ru
JID:	MrKooll@jabber.pibhe.com
			


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Comm] SQUID
  2003-03-14 10:46 [Comm] SQUID Oleg
  2003-03-14 10:59 ` Maxim Tyurin
@ 2003-03-14 11:05 ` Maxim.Savrilov
  1 sibling, 0 replies; 3+ messages in thread
From: Maxim.Savrilov @ 2003-03-14 11:05 UTC (permalink / raw)
  To: community

On Fri, 14 Mar 2003 13:46:24 +0300
Oleg <wacom@narod.ru> wrote:

> Hello community,
> 
>   Можно ли заставить squid
>   не просто вырезать баннеры,
>   а подставлять на их место какую-нибудь свою картинку?
> 
./etc/squid/squid.conf
redirect_program /etc/squid/redirector


./etc/squid/redirector
#!/usr/bin/perl                                                                                   
                                                                                                  
$0 = 'redirector' ;                                                                               
                                                                                                  
$| = 1 ;                                                                                          
                                                                                                  
$SITE = 'http://localhost/banners' ;                                                  

@b    = qw (                                                                                
                 reklama\.ru/cgi\-bin/banner/
...
 ) ;

$b_     = "$SITE/468x60.gif" ;
while (<>) {                                                                                      
  ($url, $who, $ident, $method) = /^(\S+) (\S+) (\S+) (\S+)$/ ;                                   

   $url = $b_ if grep $url =~ m%$_%, @b ;                                                                                            
  print "$url $who $ident $method\n" ;                                                            
}                                                                                                 


Вот типа если совсем просто
Лучше, конечно на С
но принцип понятен



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-03-14 11:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-14 10:46 [Comm] SQUID Oleg
2003-03-14 10:59 ` Maxim Tyurin
2003-03-14 11:05 ` Maxim.Savrilov

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git