Empty base tag causing issues

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
Haasboy
Posts: 12
Joined: Mon 28. May 2012, 09:34

Empty base tag causing issues

Post by Haasboy »

Hi all

I've got a problem on the website I'm managing. The issues lies only with IE7, and that is when I put an empty base tag into the head of the template. Now I've put an empty base tag so that I can use anchors on the web pages, otherwise anchors will redirect to the homepage. However in IE7 instead of including the full url (e.g. http://www.urlofsite/alias-name.html), it only loads the alias tag (http://alias-name.html). Does any body know how to solve this issue?
User avatar
Oliver Georgi
Site Admin
Posts: 9888
Joined: Fri 3. Oct 2003, 22:22
Contact:

Re: Empty base tag causing issues

Post by Oliver Georgi »

you cannot use an empty base tag.

A solution can be to use a frontend render in a way like this:

Code: Select all

<?php
$content['all'] = str_replace('href="#', 'href="'.rel_url().'#', $content['all']);
?>
Another solution can be JavaScript to handle this.
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Post Reply