Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-09-26T15:55:21.720Z
Answers.Text: Duh. It was the asset url to folder. Thank you for the help.
Answers.UserDisplayName: frshjb373
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-09-25T17:39:04.777Z
Answers.LastActivityDate: 2014-09-25T17:39:04.777Z
Answers.UserDisplayName: Paul
Body: <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>
  
Tags: <templating><url><htaccess>
Title: getUrl using my original develpment server domain
ThreadText: # 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') %}
                                      <div class="col">
                                          <div class="image-block">
                                              <div class="image">
                                                  {% if block.image|length %}
                                                      <a href="{{ block.pageLink.first().getUrl() }}"><img src="{{ block.image.first.getUrl() }}" alt="{{ block.alt }}"></a>
                                                  {% endif %}
                                              </div>
                                          </div>
                                          <h1><a href="{{ block.pageLink.first().getUrl() }}">{{ block.imageTitle }}</a></h1>
                                      </div>
                                  {% 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.  
  
  ---
  
  