Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1793

URL containing the scheme but not the authority (hostname)?

$
0
0

Is it legal (and good practice, and well supported) to omit the "authority" component from a URL (typically the hostname) but specify a scheme (typically http: or https: ) ?

For example, are these valid urls?

  https:login.html   (relative hostname and path)  https:/auth/login.html   (relative hostname, absolute path)

The expected behaviour, of course, would be to use the current hostname - path (relative).

(BTW, this assumes that the // after the scheme is part of the authority (host) component, I think this is the right intepretation)

The motivation is the (common) requirement that some pages of a website are to be accesed via https and other via http, and we'd like to use relative urls instead of absolute (to test in different environments).


Viewing all articles
Browse latest Browse all 1793

Latest Images

Trending Articles

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>