我有一个 .htaccess 文件,我正在尝试将其转换为 NGINX URL Rewrite 配置。不幸的是,所有可用的转换器都无济于事。每次我都会收到 403 错误或“未指定输入文件”。PHP 8.1/nginx/aapanel
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Send Requests To Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
<Files .env>
Order allow,deny
Deny from all
</Files>
</IfModule>
问题可能是授权,我无法解决:(