Added redirect back after "Wrong URL" error, closed #1119.
Improved cot_url_check() security.