<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <script> var isMobile = function () { var u = navigator.userAgent return /Mobile|Android|webOS|iPhone|iPad|Phone/i.test(u) } window.location.href = isMobile() ? '/mobile' : '/pc' </script> </body> </html>