0

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?

artmem
  • 1,022
  • 9
  • 18
  • Did you insert the links as they are (just copy paste them) do you use a redactor function in order to store them? – Robin Schambach Mar 09 '18 at 20:19
  • I'm using the redactor 'link to an entry' function. – artmem Mar 09 '18 at 22:54
  • 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 – Robin Schambach Mar 10 '18 at 08:40

0 Answers0