Replace link hình ảnh

UPDATE vcg_content
SET
  introtext = REPLACE(
    introtext,
    'https://www.vietchigo.org/web/ideas/art/_genre/',
    'https://vietchigo.synology.me/web/collection/art/'
  ),
  `fulltext` = REPLACE(
    `fulltext`,
    'https://www.vietchigo.org/web/ideas/art/_genre/',
    'https://vietchigo.synology.me/web/collection/art/'
  )
WHERE introtext LIKE '%https://www.vietchigo.org/web/ideas/art/_genre/%'
   OR `fulltext` LIKE '%https://www.vietchigo.org/web/ideas/art/_genre/%';

Replace link

UPDATE vcg_content
SET introtext = REPLACE(introtext, 'href="/', 'href="https://vietchigo.synology.me/'),
    `fulltext`  = REPLACE(`fulltext`,  'href="/', 'href="https://vietchigo.synology.me/');

Tìm

SELECT id, title
FROM vcg_content
WHERE introtext REGEXP 'src="(study|vn|ideas)/'
   OR 'fulltext'  REGEXP 'src="(study|vn|ideas)/';

 

Replace

 

 

UPDATE vcg_menu
SET link = REPLACE(link, 'ideas/', 'web/reference/');

 

-- kiểm tra trước khi update
SELECT COUNT(*) FROM vcg_content
WHERE introtext LIKE '%vietchigo.synology.me%'
   OR `fulltext` LIKE '%vietchigo.synology.me%';

 

CSS background-image cũng phải tuyệt đối

<style>
body {
  background-image: url("<?php echo Uri::root(); ?>images/bg.jpg");
}
</style>