I have a Joomla site which uses mod_rewrite
to create pretty urls.
http://www.example.com/resources/newsletter
However this created a problem. Including images like this: src="images/pic.jpg"
, it would then look for a file at:
http://www.example.com/resources/newsletter/images/pic.jpg
...which obviously doesn't exist. To work around this, I included a <base>
tag in my head
section:
<base href="http://www.example.com/" />
...which worked fine, until I tried to do a link to an anchor point (bookmark) on the same page:
<!-- on http://www.example.com/resources/newsletter -->
<a href="#footer">go to the footer</a>
<!-- clicking that link takes you to http://www.example.com/#footer -->
Changing my links to be <a href="resources/newsletter/#footer">
is not feasible, since I won't necessarily know the URL of the page when editing it. Is there any way to make some links ignore the <base>
directive?
Though I'd really prefer a straight HTML solution, I'm using jQuery on this site already, so that could be an option if I'm stuck.