Menu Content
Joomla Erweiterungen > Choose one to see more info

Zurück

HTML anchors are not working, missing images or other resources

Last revised:
Freitag, 19. Juni 2009

Answer

Please note, that if base href generation is used, then all relative anchors, such as just "#anchor", or all other resources using relative paths (such as "/images/myimg.png" or "myfiles/file1.pdf") are automatically translated with the base href URL.

This means, that if you are using anchors and homepage as base href, all anchors will be looked at within the homepage, not the actual SEF URL! Using the same logics, if using actual SEF URL as base href and having "/images" as relative path, this path will be understood by browser as it would be appended behind the SEF URL! This is the most often reason why anchors do not work or some resources (such as images or styles) appear to be missing in the page when SEO and generation of SEF URLs that adds virtual directory structure in the URL addresses is ON.

To solve this, you have to either:

  1. disable generation of base href tag or
  2. keep the base href tag generation on, but make sure all links using SEO URLs + anchors or poiting to resources are absolute, not relative
Configuration of base href generation behaviour can be set in JoomSEF metabot plugin settings (JoomSEF 3.2.11 and newer) or in JoomSEF configuration (versions prior to 3.2.11). Also please note, that the base href can be sometimes defined also on other places, such as it can be part of your template.

Kategorie

User Login Empty