tanteng
V2EX  ›  PHP

看这个伪静态 url 为什么要这样设置?

  •  
  •   tanteng · Feb 17, 2015 · 2990 views
    This topic created in 4132 days ago, the information mentioned may be changed or developed.
    http://list.iqiyi.com/www/1/----------2---11-1-1-iqiyi--.html
    这是爱奇艺的会员视频列表页面,url应该说伪静态的,但为什么要这样设置?不觉得很奇怪吗。
    前面------,中间还有个-iqiyi-,不能理解。
    5 replies    2015-06-10 16:29:52 +08:00
    aaaa007cn
        1
    aaaa007cn  
       Feb 17, 2015
    为了防止别人从字面理解 query string 个参数的意义?
    每一个 - 都相当于一个 &,然后再去掉 filed 名字和等号
    -iqiyi- 这个改成 --、-foo-、-bar- 也一样可以打开
    所以大概是个来源之类的参数
    oott123
        2
    oott123  
       Feb 17, 2015
    我猜是为了节约长度吧……
    比如 前两个短横线 第一个短横线代表:“地区”:“全部”;第二个短横线是分割
    那么“地区”:“华语”则是:`1-`

    总而言之:用短横线`-`来分割参数,同时用短横线`-`代表“全部”,就变成了你看到的这样的结果……
    oott123
        3
    oott123  
       Feb 17, 2015
    ((-|[0-9]+)-)+iqiyi\.html

    随便脑补了一个正则,不知道对不对……还蛮好玩的
    invite
        4
    invite  
       Feb 18, 2015
    其实这是一种编程语言。
    wensonsmith
        5
    wensonsmith  
       Jun 10, 2015
    @invite 面向短横线编程对么···
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1101 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 18:32 · PVG 02:32 · LAX 11:32 · JFK 14:32
    ♥ Do have faith in what you're doing.