The string to be signed is:
jsapi_ticket=sM4AOVdWfPE4DxkXGEs8VMCPGGVi4C3VM0P37wVUCFvkVAy_90u5h9nbSlYy3-Sl-HhTdfl2fzFy1AOcHKP7qg&noncestr=Wm3WZYTPz0wzccnW×tamp=1414587457&url=http://mp.weixin.qq.com?params=value
Where the contents of the URL are more "/", such as:
url=http://mp.weixin.qq.com?params=value(无“/”)
url=http://mp.weixin.qq.com/?params=value(有“/”)
Will cause "Invalid URL domain" error, why?
Reply content:
The string to be signed is:
jsapi_ticket=sM4AOVdWfPE4DxkXGEs8VMCPGGVi4C3VM0P37wVUCFvkVAy_90u5h9nbSlYy3-Sl-HhTdfl2fzFy1AOcHKP7qg&noncestr=Wm3WZYTPz0wzccnW×tamp=1414587457&url=http://mp.weixin.qq.com?params=value
Where the contents of the URL are more "/", such as:
url=http://mp.weixin.qq.com?params=value(无“/”)
url=http://mp.weixin.qq.com/?params=value(有“/”)
Will cause "Invalid URL domain" error, why?
Has anyone encountered this problem?
'/' will cause you to pass the URL of the parameter is incomplete, the SDK received the URL and your actual URL does not match, of course, will invalid domain.
This and your front-end to submit the URL to the interface of the method has a relationship, simply said that the URL encode a bit can be avoided. Some libraries such as jquery or zepto may have encode this step in the Ajax package, if you write a native Ajax, you may miss the encode, resulting in incomplete parameter delivery.