中文url如何进行移动规则适配?

如下面1组中文url:

PC url:http://www.chenhaifei.com/tag/南京旅游/

移动url:http://m.chenhaifei.com/?tag=南京旅游

规则适配如下pattern:

http://www.chenhaifei.com/tag/((?:%[a-zA-Z0-9]{2,})+)/ ->

http://m.chenhaifei/?tag=${1}

百度工程师注释:中文url,在提交验证url对时,应该填转码后的链接。如:

http://www.chenhaifei.com/tag/%E5%8D%97%E4%BA%AC%E6%97%85%E6%B8%B8/

未经允许不得转载:陈海飞博客 » 中文url如何进行移动规则适配?

分享到:更多 ()

评论 2

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #2

    I would like to get across my appreciation for your kindness giving support to men and women who actually need assistance with that topic. Your special commitment to getting the solution up and down appears to be certainly informative and has really made some individuals like me to realize their endeavors. Your entire valuable recommendations denotes a lot a person like me and still more to my fellow workers. Regards; from everyone of us.

  2. #1

    I抎 must verify with you here. Which isn’t one thing I usually do! I get pleasure from reading a put up that may make people think. Also, thanks for permitting me to remark!