tanteng
V2EX  ›  PHP

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

  •  
  •   tanteng · Feb 17, 2015 · 3334 views
    This topic created in 4281 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
    aaaa007cn
    Feb 17, 2015
    1
    为了防止别人从字面理解 query string 个参数的意义?
    每一个 - 都相当于一个 &,然后再去掉 filed 名字和等号
    -iqiyi- 这个改成 --、-foo-、-bar- 也一样可以打开
    所以大概是个来源之类的参数
    oott123
    oott123
    Feb 17, 2015
    2
    我猜是为了节约长度吧……
    比如 前两个短横线 第一个短横线代表:“地区”:“全部”;第二个短横线是分割
    那么“地区”:“华语”则是:`1-`

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

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