improve absolute URL handling