Regex Nginx删除'';扩展前的符号

Regex Nginx删除'';扩展前的符号,regex,nginx,Regex,Nginx,当我得到如下url时,我设法使index.php脚本正常运行: http://myserver.com/?something.m3u8 不过,我需要从中删除? 有什么想法吗 我的Nginx配置如下所示: server { listen 6868 default_server; root /var/tmp/mfl; index index.php; # Make site accessible from http://localhost/ server_name localhost; lo

当我得到如下url时,我设法使index.php脚本正常运行:

http://myserver.com/?something.m3u8
不过,我需要从中删除

有什么想法吗

我的Nginx配置如下所示:

server {
listen 6868 default_server;

root /var/tmp/mfl;
index index.php;

# Make site accessible from http://localhost/
server_name localhost;

location ~ \.php$ {
    try_files $uri =404;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
}

显然,这是一个单线解决方案

location / {
    try_files $uri $uri/ /index.php?$args; #appended this line 
}

服务器
块中有
返回403
。您确定此配置按预期工作吗?。将“?”与正则表达式匹配,然后替换为空字符串。@AlexanderAzarov Agh,您是对的。我正在测试一些东西,但在将其发布到stackoverflow之前忘记删除该行。