javascript - Redirecting Based on user-agent -
i redirect unwanted request pages url
i example.com/garbage-value request on server in bulk 2000+ every day request have no user agent in , shows in analytics
so want stop them,i thought possible way redirect them.
the site made in asp
can implement in asp or javascript or there other way so.
i thinking of did not worked
//for iphone/ipod site: if ((navigator.useragent.indexof('iphone') != -1) || (navigator.useragent.indexof('ipod') != -1)) { document.location = "http://url.com/iphone/"; } ---------------------------------------- //for ipad site: if ( (navigator.useragent.indexof('ipad') != -1)) { document.location = "http://url.com/ipad/"; }
Comments
Post a Comment