Reputation: 87
I was trying to turn on the ssl in http://top-minecraft-servers.com but it breaks. All the relative url like /userdata etc which are used in the img tag or as href it points to http not https. For example
<a style="text-transform: uppercase;" id="vote" class="btn btn-default serv-vote-btn" <? echo $account_user_id ?>" href="/vote">
is going to
http://top-minecraft-servers.com/vote
not
https://top-minecraft-servers.com/vote
My question is how to do it easily while not hardcoding all the links because hardcoding all the links will be very problematic.
Please help Thanks
Upvotes: 0
Views: 67
Reputation: 13806
You have a base href tag in your document which is the problem:
<base href="http://top-minecraft-servers.com/">
You need to change that as well to https:
<base href="https://top-minecraft-servers.com/">
Or, simply just remove it altogether. I'm not sure it's serving any purpose at all.
If you have a base
tag present, it's href
attribute is basically prepended to all relative links in the document, effectively making them all absolute links
See here: https://developer.mozilla.org/en/docs/Web/HTML/Element/base
Upvotes: 2