[squid-users] Redirects with Squid

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 ...


Go Back   Usenet Forums > Web Server and Related Forums > Squid Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-21-2003
reed@mail.utexas.edu
 
Posts: n/a
Default [squid-users] Redirects with Squid

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
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:46 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0