Body: <p>When building a site locally and linking to entries in redactor fields, all of the links are being saved in the database with links to my local dev server (<a href="http://mysite.test/path/" rel="nofollow noreferrer">http://mysite.test/path/</a>). Is there a config setting or any way to have these links be dynamic and use the {siteUrl} path instead of being hard-coded to the dev url?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-09T20:19:00.900Z
Comments.Text: Did you insert the links as they are (just copy paste them) do you use a redactor function in order to store them?
Comments.UserDisplayName: Robin Schambach
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-09T22:54:12.587Z
Comments.Text: I'm using the redactor 'link to an entry' function.
Comments.UserDisplayName: artmem
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-10T08:40:58.737Z
Comments.Text: You could create a twig filter and use a regex to replace old urls with new urls. Or you can (only one time initially) fetch all entries, replace the links and re-save them. The proper way would be to use reference tags `[link text]({entry:20})` or relation fields
Comments.UserDisplayName: Robin Schambach
Tags: <redactor>
Title: Redactor entry links to dev server
ThreadText: # Redactor entry links to dev server
  
  (Asked by: username_0 on 2018-03-09)
  
  When building a site locally and linking to entries in redactor fields, all of the links are being saved in the database with links to my local dev server (<http://mysite.test/path/>). Is there a config setting or any way to have these links be dynamic and use the {siteUrl} path instead of being hard-coded to the dev url?
  
  **Tags:** redactor
  
  > **Comments:**
  > **username_1**: Did you insert the links as they are (just copy paste them) do you use a redactor function in order to store them?  
  > **username_0**: I'm using the redactor 'link to an entry' function.  
  > **username_1**: You could create a twig filter and use a regex to replace old urls with new urls. Or you can (only one time initially) fetch all entries, replace the links and re-save them. The proper way would be to use reference tags `[link text]({entry:20})` or relation fields  
  
  ---
  
  ## 0 answers
  
  