One change: use the following instead for the 'web2py-url' header setting: response.headers['web2py-url'] = request.env.path_info + '?' + request.env.query_string
My original post above (using request.url) was causing the query string to be lost after the redirection. Regards, Carlos