diff --git a/docker/nginx.conf b/docker/nginx.conf index cfed3c0..f88041d 100644 --- a/docker/nginx.conf +++ b/docker/nginx.conf @@ -45,9 +45,11 @@ http { # 第二个页面的配置 location ^~ /mobile/ { - root /usr/share/nginx/html; +# index index.html index.htm; +# try_files $uri $uri.html $uri/ =404; + alias /usr/share/nginx/html/mobile/; index index.html index.htm; - try_files $uri $uri.html $uri/ =404; + try_files $uri $uri/ /mobile/index.html; } location ^~ /todo-server/ { diff --git a/src/app/page.tsx b/src/app/page.tsx index 0ea4f1f..483ef6a 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -9,7 +9,7 @@ export default function Home() { useEffect(()=>{ if(localStorage.getItem('platform-security')){ if (isMobile){ - window.location.href = 'http://www.huaruyu.com/mobile' + window.location.href = 'http://www.huaruyu.com:80/mobile/listTask' }else { replace("/task/project") }