Thanks for your answers.
I think the url was (http://wiki.squid-cache.org/ConfigExamples/PhpRedirectors) but now the site is down for maintenance, so I can't validate that.
Alejandro
2014-09-30 8:13 GMT-03:00 Eliezer Croitoru <eliezer@xxxxxxxxxxxx>:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hey Alejandro,
Can I ask where in the site have you taken this code from?
Using php as a helper is not such a good choice due to couple issues
it has with squid "stdin\stdout" emulation.
You'd better use perl\python\ruby\other then php unless you found a
solution to a bug that php developers consider a feature.
Also only squid 3.4 uses the "OK rewrite-url="" format and "ERR"
in squid 3.3 you use either a "http://xyz" as it is or
"302:http://xyz" for a redirection and a blank line "" for no change.
All The Bests,
Eliezer
On 09/29/2014 12:39 PM, Alejandro Martinez wrote:
> the redirector code is this (code taken from squid site):
>
> $temp = array(); stream_set_timeout(STDIN, 86400);
>
> while ( $input = fgets(STDIN) ) { $temp = split(' ', $input); $url
> = $temp[0]; if ( $url == "http://www.google.com" ) { echo "OK
> rewrite-url="" href="http://192.168.1.10/block.php" target="_blank">http://192.168.1.10/block.php \n"; } else { echo "ERR
> \n"; } }
>
> Thanks
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQEcBAEBAgAGBQJUKpBVAAoJENxnfXtQ8ZQUqu8H/ifHq2l8BrrSb5JIo7xf4ijw
1jRbFt37ApmrEFMmaiZVErEvAyi8miHqjmlgeLLA+efXydCIISbBZHOsDdOima+3
gshG9gaceJ54zP0dGiPL1pCRioGY16R2JQh7nhWz/scSEVcmB1UQ4bHmrkpsJ9Y2
OHwf/cuSGbYXtgzHsavDmNYdUp+UpJ0KtoealP35UmqizRW5OSA4YqusEPwxG1oj
HRqHocPE9Lb0BMIkBjZDbWs9DMRYAvx6p5JJaCB0VpwpXBa8oIMB5Fke6AjoAwBn
5k9nWo2myvQ+raa1WHldJF7xaUbFNVB2VFDt3Rw48PEVP+YJKIjlAZWpXzuZcnI=
=XWQb
-----END PGP SIGNATURE-----
_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users
_______________________________________________ squid-users mailing list squid-users@xxxxxxxxxxxxxxxxxxxxx http://lists.squid-cache.org/listinfo/squid-users