Zend Framework: validation of hostname
I would like to check a hostname. For exapmle: www.site.ru, site.ru, http://site.ru.
These variants are correct. But: http://site.ru/ zf sets as 开发者_开发知识库not correct.
How to check the hostname like shown above via hostname validator?
www.site.ru
, site.ru
are domains while http://www.site.ru is URI you need to manually strip the protocol/scheme part, by the way site.ru/folder/
is a correct URI but a correct hostname. I wrote a filter for Zend Framework, which allow you to prepend http:// to an hostname. Maybe that helps
精彩评论