Improved url validation for AMD.