Why would you need a slash at the end of a URL?

前端 未结 5 1032
名媛妹妹
名媛妹妹 2020-12-31 19:38

Is there a difference between these URLs in regards to having slashes at the end of the URL?

https://drchrono.com/about_us
https://drchrono.com/about_us/
         


        
5条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2020-12-31 19:53

    / is the separation character.

    From the RFC

    Some URL schemes (such as the ftp, http, and file schemes) contain names that can be considered hierarchical; the components of the hierarchy are separated by "/".

    Having a / at the end states that there might be more stuff in the url.

提交回复
热议问题