This issue has a few different layers to it.

  1. I'm running a site over https. The issue I'm having is that ajax calls are being made over http, despite having relative urls.
  2. After looking into it, this is due to the base url having the http:// prefix instead of https://
  3. When I try to enable the 'force_ss' option to fix the base url, apache sends me into an infinite redirect loop.

Our server is setup behind a load balancer that handles the https request. For example. You hit http://www.example.com. The load balancer will handle the ssl and then send the traffic to the Joomla servers using port 80.

What I think is happening is that Joomla is seeing it come over port 80, thinking that its not ssl, then redirecting it to be ssl which is sending it back to the load balancer.

I've also set my $live_site configuation to be https but it didn't help. JUri::base() is return https, however.

Is there a way to force the base url to be https:// in joomla while handling traffic over port 80?

  • Can you use a relative port in the $live_site configuration: //www.example.com? Commented Feb 24, 2015 at 3:58

1 Answer 1


I ended up adding this to the template when https is needed:

$doc = &JFactory::getDocument();
$jbase_ssl = str_replace("http:", "https:", $doc->getBase());

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.