Home > Article > Backend Development > What is the difference between the following two URLs?
http://117.80.169.239:1234/api/
http://117.80.169.239:1234//api/ Why sometimes two slashes can be accessed, sometimes not
http://117.80.169.239:1234/api/
http://117.80.169.239:1234//api/ Why sometimes two slashes can be accessed, sometimes not
Not the same, PATH_INFO is different, two different addresses are requested.
In PHP and static resources, they will be mapped to the file directory by default. For the file directories /
and //
, it can be understood that they are consistent at the beginning, so they can all be accessed.
But from the perspective of the HTTP
protocol, one is GET /api/
and the other is GET //api/
, which are two different addresses.