Having a strange issue with J3.3.6. The <base>
tag href
is always pointing to the root / homepage of my name, e.g www.example.com, even when on an inner page. I only noticed when trying to use an anchor, and the anchor used the base href and linked to the homepage.
I haven't come across this issue with any other sites I've built on 3.3.6, and as far as I can tell there aren't any other differences. I've tried:
- Resetting .htaccess to the J! default (I added in a few cache control headers - no change)
- Switching off SEF URLs (see below)
- Checking $live_site in configuration.php (no value set)
When I switch off SEF URLs and URL re-writing, the base href is disappears (only the canonical link remains, which is correct).
If I edit /libraries/joomla/html/document/renderer/head.php
, around line 74 - 76 to use JURI::current()
instead of $document->getBase();
then the correct URLs at used in the base value if SEF URLs are enabled - but I've never had to do this before and obviously this will be wiped on upgrade. If SEF URLs are off this is wrong as it just goes to index.php without any query parameters, causing the same sort of issue in reverse (anchors all go to the homepage).