bug fix: url regex is not correct

The following url is considered as invalid format based on the previous url regex: 

http://localhost/
http://127.0.0.1