From 9c900ecaadd1be0d50228e7245dff1685d709561 Mon Sep 17 00:00:00 2001 From: Coding Zhang <2291200076@qq.com> Date: Wed, 18 Aug 2021 23:36:42 +0800 Subject: [PATCH] 2021.08.18 small changes --- docs/README.md | 6 +++--- docs/_sidebar.md | 2 +- docs/manual/internal/pseudo-static.md | 24 +++++++++++++++++++----- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/docs/README.md b/docs/README.md index af10475..b25e847 100644 --- a/docs/README.md +++ b/docs/README.md @@ -36,11 +36,11 @@ | 背Ta单词 | 网址 | |------|------| -| 代码仓库 | Gitee(推荐) GitHub(暂未上线) | -| 项目主页(暂未上线) | tawords.com | +| 代码仓库 | Gitee(推荐) GitHub(暂未上线) | +| 官方网站 | tawords.com | | 应用中心(暂未上线) | app.tawords.com | | 演示站点(暂未上线) | demo.tawords.com | -| 社区(暂未上线) | club.tawords.com | +| 社区 | club.tawords.com | | 官方运营网站 | reciteword.com | ------------ diff --git a/docs/_sidebar.md b/docs/_sidebar.md index 8bfce49..03c4c3e 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -87,8 +87,8 @@ - **七、背Ta单词内部开发文档** - [安装升级向导 官网接口](/manual/internal/deployment-wizard) - - [官网首页伪静态配置规则](/manual/internal/pseudo-static) - [检查SSL证书过期时间[PHP]](/manual/internal/check-cert) + - [官网首页伪静态配置规则](/manual/internal/pseudo-static) - **八、其他** diff --git a/docs/manual/internal/pseudo-static.md b/docs/manual/internal/pseudo-static.md index 374c8dc..006be3a 100644 --- a/docs/manual/internal/pseudo-static.md +++ b/docs/manual/internal/pseudo-static.md @@ -19,22 +19,36 @@ location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project) # > 2021.08.18更新 -http跳转https;www跳转@;访问二级域名指向网站的二级路径 +http跳转https ```nginx # http跳转https if ($server_port !~ 443){ rewrite ^(/.*)$ https://$host$1 permanent; } +``` +www跳转@ + +```nginx +# $host = www.reciteword.com +# $1 = reciteword.com +# $request_uri = 请求参数 +# return 301 https://reciteword.com$request_uri; # 👇www跳转@ -if ($host ~* "^www\.(.*?\..*?)$") # if ($host = 'www.reciteword.com') +if ($host ~* "^www\.(.*)$") { - # $host = www.reciteword.com - # $1 = reciteword.com - return 301 https://$1; # https://reciteword.com$request_uri; + return 301 https://$1$request_uri; } +``` +----- + +【以下弃用】 + +访问二级域名指向网站的二级路径(纯静态网页可以,PHP页面会出404 Not Found) + +```nginx location ~ { index index.php index.html index.htm;