Skip to main content
2 of 5
added 184 characters in body
Triskelion
  • 4.9k
  • 2
  • 19
  • 23

Why are you using absolute links? If you were using relative links, of the form /node/22, the problem would not arise.

If the links are in the node body, and if you have direct access to your database, you can update the text by running a query on the field_data_body and field_revision_body tables.

First, back up your database in case this goes wrong.

Then run the following query on your tables:

UPDATE field_data_body SET body_value = REPLACE( body_value, 'a href="www.mysite.com/','a href="mysite.net/');

Repeat with the field_revision_body table.

This should change all references to the old domain with the new domain.

If you have links in the comments, you might also want to do field_data_comment_body and field_revision_comment_body, scanning for references in the comment_body_value field.

Triskelion
  • 4.9k
  • 2
  • 19
  • 23