Try to use location.path()