Redirect to mobile website
Hi,
I'm making a mobile website and to redirect to mobile version i used this code
<script>
if (document.location.search.indexOf("skipmobile") >= 0) {
document.cookie = "skipmobile=1";
}
else if ((document.location.hostname.match(/\.mobi$/) || screen.width < 699)
&& document.cookie.indexOf("skipmobile") == -1)
{
document.location = "mobile/";
}
</script>
but the problem is this when I access the website on mobile it does change the url to like this
www.testsite.com/mobile/
path to the mobile site.
Any one can help me how can i fix the url to same as the main site...
www.testsite.com
Thanks a lot...