title: Redirecting Based on user-agent
body: <p>I would like to redirect all the unwanted request pages to a url</p>
  
  <p>i get example.com/garbage-value request on my server in bulk like 2000+ every day
  The request have no user agent in it , it shows up in the analytics</p>
  
  <p>so i want to stop them,i thought that the possible way is to redirect them.</p>
  
  <p>the site is made in asp</p>
  
  <p>can we implement in asp or javascript or is there any other way to do so.</p>
  
  <p>i was thinking of something like this but it did not worked</p>
  
  <pre><code>    //For an iPhone/iPod site:
  
  if ((navigator.userAgent.indexOf('iPhone') != -1) || (navigator.userAgent.indexOf('iPod') != -1)) {
                  document.location = "http://URL.com/iphone/";
          } 
  ----------------------------------------
  
  //For an iPad site:
  
  if ( (navigator.userAgent.indexOf('iPad') != -1)) {
                  document.location = "http://URL.com/ipad/";
          }
  </code></pre>