<p>Have you checked the path of the asset source the image is in? Sounds like that might still be the old server's path.
Best practice is to use <a href="http://buildwithcraft.com/docs/multi-environment-configs#environment-specific-variables" rel="nofollow">Environment-specific variables</a> in your config file, and then use those in you Asset Source settings as well.</p>

<p>So, use {basePath}assets/site as your File System Path for instance (if you've used basePath as a config variable). </p>

<p>That way, it will adapt to whatever environment you're working on.</p>

CC BY-SA 3.0
2014-09-26T15:55:21.720Z
Duh. It was the asset url to folder. Thank you for the help.
frshjb373
CC BY-SA 3.0
2014-09-25T17:39:04.777Z
2014-09-25T17:39:04.777Z
Paul
<p>I have the following code and after moving site to a live server, the img src is using the old domain, however, the anchor links have correct domain name.  Any idea what the issue is?</p>

<pre><code>                                {% for block in entry.threeHomepageImages.type('images') %}
                                    &lt;div class="col"&gt;
                                        &lt;div class="image-block"&gt;
                                            &lt;div class="image"&gt;
                                                {% if block.image|length %}
                                                    &lt;a href="{{ block.pageLink.first().getUrl() }}"&gt;&lt;img src="{{ block.image.first.getUrl() }}" alt="{{ block.alt }}"&gt;&lt;/a&gt;
                                                {% endif %}
                                            &lt;/div&gt;
                                        &lt;/div&gt;
                                        &lt;h1&gt;&lt;a href="{{ block.pageLink.first().getUrl() }}"&gt;{{ block.imageTitle }}&lt;/a&gt;&lt;/h1&gt;
                                    &lt;/div&gt;
                                {% endfor %}
</code></pre>

<templating><url><htaccess>
getUrl using my original develpment server domain
# getUrl using my original develpment server domain

(Asked by: username_0 on 2014-09-25)

I have the following code and after moving site to a live server, the img src is using the old domain, however, the anchor links have correct domain name.  Any idea what the issue is?
                                {% for block in entry.threeHomepageImages.type('images') %}
                                    
                                        
                                            
                                                {% if block.image|length %}
                                                    
                                                {% endif %}
                                            
                                        
                                        {{ block.imageTitle }}
                                    
                                {% endfor %}

**Tags:** templating, url, htaccess

---

## 1 answers

### Answer by username_1 on 2014-09-25. Score: 3 | Accepted answer

Have you checked the path of the asset source the image is in? Sounds like that might still be the old server's path.
Best practice is to use [Environment-specific variables](http://buildwithcraft.com/docs/multi-environment-configs#environment-specific-variables) in your config file, and then use those in you Asset Source settings as well.

So, use {basePath}assets/site as your File System Path for instance (if you've used basePath as a config variable).

That way, it will adapt to whatever environment you're working on.

> **Comments:**
> **username_0**: Duh. It was the asset url to folder. Thank you for the help.  

---

