nginx配置文件需要代码段。原始的.htaccess:
选项-MultiViews
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
答案 0 :(得分:0)
Nginx不支持.htacess文件。您可以将.htacess设置导入到nginx conf文件中。
您可以使用.htacess到nginx转换器https://winginx.com/en/htaccess。