Zeus Ezproxy Request Rewriting

zeus

As the default format for ezproxy urls is a bit unwieldy, I decided to simplify the whole bit using Zeus’ powerful request rewriting features.

An ezproxy url looks like this:

http://ezproxy.xxx.edu:2048/login?url=(URL TO ACCESS)

Request Rewriting

Instead of that long gibberish, users can now access an ezproxy url like this:

/ezproxy/(URL TO ACCESS)

The rewriting script:

#match request ezproxy requests
match URL into $ with ^/ezproxy/(.*)$
if matched then
   set Response = 302
   set OUT:Location =     http://ezproxy.xxx.edu:2048/login?url=$1
   set OUT:Content-Type = text/html
   set Body = Go here instead.
endif