[Solved] homepage links dont work with protocol uri
-
Hey sorry, can you elaborate please?
-
i put a link in the field like something
//example.com
thats makes a link to the http version and looks likehttp:////example.co
but the version of example is https. Anyway if i puthttps://example.com
in the Field all works. but i prefer to setup the filed to work with protocol uris -
Let me see if I understand...
Putting
//example.com
comes back ashttp:////example.com
, which doesn't work.Putting
https://example.com
works as it should.Allow me to test.
website <-- seems to do what it's supposed to here. As I don't have https, the page fails.
Ok, I've got it.
[A URL](//example.com)
will return the same protocol as the site you type it on. So typing the//
uses the https protocol, on my own site (which doesn't have http or https in the URL) doesn't append either. Seems like pretty standard behaviour.So in closing, if you want the
//
to default to https, your forum needs to be run on https as well. Otherwise you'll get http. -
@ekn33 Use the backtick
Found more info about the use of
//
It's called a "protocol-relative URL". Similar to how a url starting with "/" is relative to the root of the current domain, a URL starting with "//" will link to the specified host and path, but using whatever protocol the current page was loaded using. So your site needs https if you want to use the protocol relative URL to point to https also.