› httpbin - 协议调试工具
› httpstatuses - 协议状态码查询
› httpie - cURL-like tool for humans
Fiddler
wencan
V2EX  ›  HTTP

http url 中 /root 和 /root/ 相同吗?

  •  
  •   wencan · Oct 22, 2015 · 4271 views
    This topic created in 4043 days ago, the information mentioned may be changed or developed.

    https://www.v2ex.com/new 创作新主题
    https://www.v2ex.com/new/ 404

    https://golang.org/doc 会跳转到 https://golang.org/doc/

    下面两个是一样的
    https://github.com/wencan/docker-library
    https://github.com/wencan/docker-library/

    今天还发现, nginx location 执行精确匹配时,/root 和 /root/是不同的

    7 replies  •  2015-10-22 17:10:57 +08:00
    blacktulip
    blacktulip
    Oct 22, 2015
    1
    google 搜 trailing slash in url
    Shieffan
    Shieffan
    Oct 22, 2015❤️1
    2
    相不相同要看你服务端怎么处理,你可以定义 /root 跟 /root/为不同的业务逻辑,你也可以让 /root 301 到 /root/,你也可以 rewrite 掉结尾的 /
    wildfates
    wildfates
    Oct 22, 2015
    3
    /root.txt

    /root/.txt

    这种是不是就明白了?

    带 /是文件夹,不带是文件
    imkodo
    imkodo
    Oct 22, 2015❤️1
    4
    域名后面从"/"开始的字符串服务器是怎么处理的你永远都不知道
    wencan
    wencan
    OP
    Oct 22, 2015
    5
    @wildfates 我也知道一个是文件,一个是文件夹
    但这是对传统的文件服务器而言的
    cevincheung
    cevincheung
    Oct 22, 2015
    6
    URL 表示一个资源。
    /root 和 /root/ 代表是两个资源。
    xfspace
    xfspace
    Oct 22, 2015
    7
    url rewrite
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2423 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 12:07 · PVG 20:07 · LAX 04:07 · JFK 07:07
    ♥ Do have faith in what you're doing.