Nginx.在Jelastic编辑器中,相等符号显示为错误



我有这个nginx配置

 location /upload/images {
        rewrite "/upload/images/(.*)" /upload/images/index.php?path=$1 last;
    }

似乎我的jelastic编辑器不识别路径后的=等于符号,编辑器没有很好地格式化我的代码,代码不可读。在最后一句中使用等号有没有别的方法?

我试着把URL:

"/upload/images/index.php?path=$1 last";

但没有任何变化。

"=" or "/=" 

没有改变编辑器格式化代码的方式。

似乎您忘记为请求设置根目录了。请使用以下位置块:

location /upload/images {
            root   /var/www/webroot/ROOT;
            rewrite "/upload/images/(.*)" /upload/images/index.php?path=$1 last;
        }

最新更新