Here is the site

Русская site/ru/product/... Укр site/product/... 

How to check what is ru?

 if(...){ echo "RU"; }else{ echo "Uk"; } 
  • Russian with two 's' writing - NewView
  • five
    @NewView and “writing” without a soft sign;] - de_frag

1 answer 1

You can regular expression:

 if(preg_match('~/ru/~i', $url)) { // very good } 
  • Does not work ???? - Alex Kizyma
  • Do you have slashes in the right direction? - de_frag