Title: base href = subfolder
Last modified: August 18, 2016

---

# base href = subfolder

 *  [wpguin](https://wordpress.org/support/users/wpguin/)
 * (@wpguin)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/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](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.gif`
 * The 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.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [wpguin](https://wordpress.org/support/users/wpguin/)
 * Last activity: [20 years, 4 months ago](https://wordpress.org/support/topic/base-href-subfolder/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
