Merhaba @gokalp787;

if ( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { window.location = "mobil/index.html"; }
veya

if (screen.width <= 720) { window.location = "http://m.example.com"; }
dener misiniz?

Daha fazlası için: https://fedingo.com/how-to-redirect-users-to-mobile-website/