Remove ALT Language URLs

OVERVIEW:

For points of sale with multiple languages, we need to ensure that URLs with a language-specific string only appear on the correct language site. For example we would not want URLs with ‘%/en/%’ to appear on a non-English site. 

  • TH-th vs. TH-en
  • JP-ja vs. JP-en
  • HK-tc/sc vs. HK-en
  • CA-fr vs. CA-en

PROCESS:

The queries below are offered only as an example. Other patterns and language strings might need to be checked as well.

USE gkms_'{POS}';

select count(*) from ds.seo_staticurls with(nolock) where url like '%/en/%' and deleted = 0
select count(*) from smm_url_validation with(nolock) where url like '%/en/%' and is_active = 1

-- update ds.seo_staticurls set deleted = 1 where url like '%/en/%' and deleted = 0
-- update smm_url_validation set is_active = 0 where url like '%/en/%' and is_active = 1

History

Leave a Reply