error msg and regex secured

s/^http/https/ could possibly change a "https:" to "httpss:". Since you probably don't want that, take the ":" into the match. The other direction should be ok though.