Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

【寻求帮助】是否需要一个单独的域名访问 #331

Closed
WernerHai opened this issue Nov 7, 2023 · 3 comments
Closed

【寻求帮助】是否需要一个单独的域名访问 #331

WernerHai opened this issue Nov 7, 2023 · 3 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@WernerHai
Copy link

以前我是放在主域名的二级目录下使用,现在需要解析域名到/public 目录,是不是只能使用单独的二级域名去解析了?

@WernerHai WernerHai added the help wanted Extra attention is needed label Nov 7, 2023
@yuantuo666

This comment was marked as outdated.

@NewNeko-2022
Copy link

NewNeko-2022 commented Nov 17, 2023

//> 以前我是放在主域名的二级目录下使用,现在需要解析域名到/public 目录,是不是只能使用单独的二级域名去解析了?

location /neko/ {
if (!-e $request_filename){
rewrite ^/neko/(.*)$ /neko/index.php?s=$1 last; break;
}
}
给你一个伪静态子目录模板,也许是对的(

@yuantuo666
Copy link
Owner

因使用 ThinkPHP 框架,v3.0.0版本开始不再支持子目录访问“特性”,建议使用单独域名访问并正确配置权限,以防止潜在的攻击。如实在无法单独分配域名,建议通过反向代理的方式实现子目录访问。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants