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

前端 未结 5 1076
名媛妹妹
名媛妹妹 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:54

    They are handled as different requests, although they might match the same resource/handler/routine at the end and be processed in the same way.

    As the one with / is supposed to be something similar to a directory, all relative links will be inside the / i.e. previous/target/something ... while the one without will have the relative links be at the same level previous/something.

提交回复
热议问题