19 lines
367 B
Markdown
Raw Normal View History

2025-02-24 22:48:23 +08:00
# 伪静态需求
```Apache
RewriteEngine on
RewriteBase /
RewriteCond $1 ^(index\.php)?$ [OR]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} ^index\.php?$
RewriteRule ^(.*)$ - [S=1]
RewriteRule . /index.php [L]
```
```nginx
location / {
try_files $uri $uri/ /index.php?$query_string;
}
```