https://example.com//path的相对URL是什么?

时间:2015-02-28 13:34:13

标签: url

" https://example.com"的相对(https://example.com//path)网址是什么?

不是" //路径"因为这是一个绝对的URL。

2 个答案:

答案 0 :(得分:0)

答案 1 :(得分:0)

绝对路径确实是https://example.com//path,它被称为绝对路径,因为您不需要任何其他东西导航到该网址,这与通常相对于根目录的相对网址不同文档的内容,例如/path

相对网址将始终返回其所在的域,
因此,如果您http://example.com,则/path会重定向到http://example.com/path 如果您将应用移至http://example2.com,则该网址将重定向至http://example2.com/path

双斜杠是一个错误,但大多数情况下,Web服务器会修复该错误并将您重定向回正确的URL,例如 https://stackoverflow.com/////a//////28782401/////2149092会将您重定向回同一个答案。

相关问题