3

I set up Joomla to access it through a reverse-proxy. Everything works fine except the HTML has a <base> tag pointing to the real domain name. The browser changes relative links like /signup into fully qualified URIs using the <base> href value. All of the links on the site are relative. How do I prevent Joomla from inserting the <base href="..."> tag into the <head> of the document, or else how do I set the value to the domain that has the reverse-proxy?

I tried setting public $live_site in configuration.php but it didn't change anything.

I tried turning off "Use URL Rewriting", but it didn't change anything.

Research: https://duckduckgo.com/?q=joomla+reverse+proxy+base+tag&ia=qa

3

I found this answer, but I don't think it's permanent.

https://forum.joomla.org/viewtopic.php?t=354052#p2725317

To remove the base tag in the header simply add this to your template file (index.php)

$this->base = '';

I edited public_html/templates/yootheme/index.php.

1

I haven't tried it recently, but the following should still do it:

$doc = JFactory::getDocument();
unset($doc->base);

It can be placed in your template's index.php, or in a system plugin. For your template, see if the one you use offers a way for your to add your own custom functions somewhere, so it can be maintained when you update it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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