smarter url redirecting