This is a discussion on [squid-users] Redirects with Squid within the Squid Users forums, part of the Web Server and Related Forums category; Greetings, Here at UT, we are planning on using Squid on FreeBSD to control the web browsing on some kiosks ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Greetings,
Here at UT, we are planning on using Squid on FreeBSD to control the web browsing on some kiosks we are putting up in the health clinic. Currently we have a kiosk web page and then two links: One that allows students to see what they owe and the other allows them to change their address, etc online. They have a University login to get to those pages. When they logout we have modified the sample perl script on the Squid FAQ to redirect them back to our kiosk page. (normally it would go to the UT homepage). So far so good. However we have another problem: There are a number of side links on these two web pages that go to other places in UT. We don't want that to happen. Our initial solution was to further modify the script to have a conditional...however this doesn't work...we cannot figure out why. Here is what is written so far: #!/usr/local/bin/perl $|=1; while (<>) { if (m@^https://utdirect.utexas.edu/utdirect....WBX?t=MYHOME@ || m@^<a href="https://utdirect.utexas....s_list.WBX</a>@ || m@^<a href="https://utdirect.utexas..../index.WBX</a>?t=MYJOB@ || m@^<a href="https://utdirect.utexas..../index.WBX</a>?t=MY40ACRES@ || m@^<a href="https://utdirect.utexas..../index.WBX</a>?t=MYFINANCES@) { print "https://utdirect.utexas.edu/security-443/logoff.cgi/n"; } This part above here (with the || statements) DOES NOT work. The part below works fine, When going to utexas.edu we do get redirected fine. elsif ( m@^<a href="http://www.utexas.edu" t...utexas.edu</a>@ ) { s@http://www.utexas.edu@http://web2.uhs.utexas.edu/kiosk@; print; } else { print; } } Has anybody else successfully modified the example redirect perl script (or any other perl script) to control multiple links? TIA Robert Reed Systems Analyst, UHS University of Texas at Austin |
![]() |
| Thread Tools | |
| Display Modes | |
|
|