This repository has been archived on 2026-06-20. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
wangpu_auth/.htaccess
T
wsh5485 71e0d3ed7e feat: 添加.htaccess文件并简化index.php逻辑
添加.htaccess文件实现URL重写规则,将所有请求重定向到index.php
修改index.php逻辑,忽略请求路径直接返回固定JSON响应
2025-11-25 17:26:11 +08:00

16 lines
399 B
ApacheConf

# 启用URL重写引擎
RewriteEngine On
# 基础目录设置
RewriteBase /
# 如果请求的是一个存在的文件或目录,则不进行重写
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# 所有请求都重定向到index.php
RewriteRule ^(.*)$ index.php [L]
# 确保查询字符串被保留
RewriteCond %{QUERY_STRING} .+
RewriteRule ^(.*)$ index.php?$0 [L,QSA]