【问题标题】:.htaccess -> Nginx Config.htaccess -> Nginx 配置
【发布时间】:2019-04-22 16:54:51
【问题描述】:

nginx 配置文件需要 sn-p。原始.htaccess:

选项 - 多视图

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}]

【问题讨论】:

标签: apache .htaccess nginx


【解决方案1】:

Nginx 不支持 .htacess 文件。您可以将 .htacess 设置导入 nginx conf 文件。

您可以使用 .htacess 到 nginx 转换器https://winginx.com/en/htaccess。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-05-19
    • 2015-01-14
    • 1970-01-01
    • 2016-03-26
    • 1970-01-01
    • 1970-01-01
    • 2018-02-24
    • 1970-01-01
    相关资源
    最近更新 更多