Properly generate the hook url.