fix redirecturl for non root urls