<ruleset name="Google Shopping">
  <target host="*.google.com" />
  <target host="google.com" />
  <target host="www.google.com.*" />
  <target host="google.com.*" />
  <target host="www.google.co.*" />
  <target host="google.co.*" />
  <target host="www.google.*" />
  <target host="google.*" />

  <rule from="^http://encrypted\.google\.com/(prdhp|shopping)" 
          to="https://www.google.com/$1" />

  <!-- https://shopping.google.com is currently broken; work around that... -->
  <rule from="^https?://shopping\.google\.com/"
          to="https://www.google.com/shopping" />
  <rule from="^http://(www\.)?google\.com/prdhp"
	  to="https://www.google.com/prdhp" />
  <rule from="^http://(?:www|encrypted)\.google\.com/(.*tbm=shop)"
          to="https://www.google.com/$1" />

  <rule
   from="^http://(?:www\.)?google\.(?:com?\.)?(?:au|ca|gh|ie|in|jm|ke|lk|my|na|ng|nz|pk|rw|sl|sg|ug|uk|za|zw)/(prdhp|shopping)"
     to="https://www.google.com/$1" />
  <rule
   from="^http://(?:www\.)?google\.(?:com?\.)?(?:ar|bo|cl|co|cu|cr|ec|es|gt|mx|pa|pe|py|sv|uy|ve)/(prdhp|shopping)$"
    to="https://www.google.com/$1?hl=es" />
  <rule
   from="^http://(?:www\.)?google\.(?:com\.)?(?:ae|bh|eg|jo|kw|lb|ly|om|qa|sa)/(prdhp|shopping)$"
     to="https://www.google.com/$1?hl=ar" />
  <rule from="^http://(?:www\.)?google\.(?:at|ch|de)/(prdhp|shopping)$"
          to="https://www.google.com/$1?hl=de" />
  <rule from="^http://(?:www\.)?google\.(fr|nl|it|pl|ru|bg|pt|ro|hr|fi|no)/(prdhp|shopping)$"
          to="https://www.google.com/$2?hl=$1" />
  <rule from="^http://(?:www\.)?google\.com?\.(id|th|tr)/(prdhp|shopping)$"
          to="https://www.google.com/$2?hl=$1" />
  <rule from="^http://(?:www\.)?google\.com\.il/(prdhp|shopping)$"
          to="https://www.google.com/$1?hl=he" />
  <rule from="^http://(?:www\.)?google\.com\.kr/(prdhp|shopping)$"
          to="https://www.google.com/$1?hl=ko" />
  <rule from="^http://(?:www\.)?google\.com\.kz/(prdhp|shopping)$"
          to="https://www.google.com/$1?hl=kk" />
  <rule from="^http://(?:www\.)?google\.com\.jp/(prdhp|shopping)$"
          to="https://www.google.com/$1?hl=ja" />
  <rule from="^http://(?:www\.)?google\.com\.vn/(prdhp|shopping)$"
          to="https://www.google.com/$1?hl=vi" />
  <rule from="^http://(?:www\.)?google\.com\.br/(prdhp|shopping)$"
          to="https://www.google.com/$1?hl=pt-BR" />
  <rule from="^http://(?:www\.)?google\.se/(prdhp|shopping)$"
          to="https://www.google.com/$1?hl=sv" />

<!-- If there are URL parameters, keep them. -->
  <rule
   from="^http://(?:www\.)?google\.(?:com?\.)?(?:ar|bo|cl|co|cu|cr|ec|es|gt|mx|pa|pe|py|sv|uy|ve)/(prdhp|shopping)\?"
    to="https://www.google.com/$1?hl=es&#38;" />
  <rule
   from="^http://(?:www\.)?google\.(?:com\.)?(?:ae|bh|eg|jo|kw|lb|ly|om|qa|sa)/(prdhp|shopping)\?"
     to="https://www.google.com/$1?hl=ar&#38;" />
  <rule from="^http://(?:www\.)?google\.(?:at|ch|de)/(prdhp|shopping)\?"
          to="https://www.google.com/$1?hl=de&#38;" />
  <rule from="^http://(?:www\.)?google\.(fr|nl|it|pl|ru|bg|pt|ro|hr|fi|no)/(prdhp|shopping)\?"
          to="https://www.google.com/$2?hl=$1&#38;" />
  <rule from="^http://(?:www\.)?google\.com?\.(id|th|tr)/(prdhp|shopping)\?"
          to="https://www.google.com/$2?hl=$1&#38;" />
  <rule from="^http://(?:www\.)?google\.com\.il/(prdhp|shopping)\?"
          to="https://www.google.com/$1?hl=he&#38;" />
  <rule from="^http://(?:www\.)?google\.com\.kr/(prdhp|shopping)\?"
          to="https://www.google.com/$1?hl=ko&#38;" />
  <rule from="^http://(?:www\.)?google\.com\.kz/(prdhp|shopping)\?"
          to="https://www.google.com/$1?hl=kk&#38;" />
  <rule from="^http://(?:www\.)?google\.com\.jp/(prdhp|shopping)\?"
          to="https://www.google.com/$1?hl=ja&#38;" />
  <rule from="^http://(?:www\.)?google\.com\.vn/(prdhp|shopping)\?"
          to="https://www.google.com/$1?hl=vi&#38;" />
  <rule from="^http://(?:www\.)?google\.com\.br/(prdhp|shopping)\?"
          to="https://www.google.com/$1?hl=pt-BR&#38;" />
  <rule from="^http://(?:www\.)?google\.se/(prdhp|shopping)\?"
          to="https://www.google.com/$1?hl=sv&#38;" />

</ruleset>
