Skip to main content
added 14 characters in body
Source Link
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.

I am assuming you are using Drupal 7. The answer for D6 would be a little more complex.

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="http://www.mysite.com/','a href="http://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.

In the event the links are being generated automatically by a text filter, change the REPLACE patterns accordingly.

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

I am assuming you are using Drupal 7. The answer for D6 would be a little more complex.

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="http://www.mysite.com/','a href="http://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.

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

I am assuming you are using Drupal 7. The answer for D6 would be a little more complex.

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="http://www.mysite.com/','a href="http://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.

In the event the links are being generated automatically by a text filter, change the REPLACE patterns accordingly.

added 14 characters in body
Source Link
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.

I am assuming you are using Drupal 7. The answer for D6 would be a little more complex.

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="wwwhref="http://www.mysite.com/','a href="mysitehref="http://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.

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

I am assuming you are using Drupal 7. The answer for D6 would be a little more complex.

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.

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

I am assuming you are using Drupal 7. The answer for D6 would be a little more complex.

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="http://www.mysite.com/','a href="http://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.

added 91 characters in body
Source Link
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.

I am assuming you are using Drupal 7. The answer for D6 would be a little more complex.

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.

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.

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

I am assuming you are using Drupal 7. The answer for D6 would be a little more complex.

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.

added 184 characters in body
Source Link
Triskelion
  • 4.9k
  • 2
  • 19
  • 23
Loading
Source Link
Triskelion
  • 4.9k
  • 2
  • 19
  • 23
Loading