base href = subfolder
-
For web development testing purposes (of a blog that resides in the root of the main domain), I have a testing blog at http://subdomain.domain.com/subfolder.
In header.php, I have set a base href:
<base href="<?php echo get_settings('siteurl'); ?>" />Everything works well except images are missing. The code I have tried is:
<img src="wp-content/themes/default/images/image.gif" />and
<img src="/wp-content/themes/default/images/image.gif" />The base href is getting ignored and image.gif wants to be found at:
http://subdomain.domain.com/wp-content/themes/default/images/banner.gifThe difference is that /subfolder is missing. Any ideas how to get this fixed without adding /subfolder to the img src code?
i.e.
<img src="/subfolder/wp-content/themes/default/images/banner.gif" />I don’t want to do that because when I copy files over to the live blog, then I’d have to remove /subfolder from everything.
The topic ‘base href = subfolder’ is closed to new replies.