%SCRIPTURL{"script"}%
http://www.dcs.qmul.ac.uk/imc/ds/twiki/bin/script
%SCRIPTURL{"viewauth"}%/%WEB%/%TOPIC%
which expands to http://www.dcs.qmul.ac.uk/imc/ds/twiki/bin/viewauth/TWiki/VarSCRIPTURL2
%SCRIPTURLPATH{"script"}%
instead, as it works with URL rewriting much better