happens, I think I'm doing it wrong
                  
                  
                  location ~ {
                  
                  
                      root    /r/a.php;
                  
                  
                      index   a.php;
                  
                  
                      rewrite         ^/r/?$ /r/a.php?b=main? last;
                  
                  
                      fastcgi_pass            127.0.0.1:9000;
                  
                  
                      fastcgi_index           a.php;
                  
                  
                      fastcgi_param         SCRIPT_FILENAME  /r/a.php/$fastcgi_script_name;
                  
                  
                      include                     fastcgi_params;
                  
                  
                  }
                  
                  
                
wrong. completely. dot.
finally I got it! 😁 I created a new subdomain so I could test and after experimenting with configurations I have discovered which one works. the file is on /r/a.php and the old url is: mysite.com/r/a.php?b=123456 and the new url is: mysite.com/r/123456 (cleaner, just what I wanted)
После многих попыток мне это удалось. Это конфигурация, которая работала: location ~ /r { rewrite ^/r/(.+)$ /r/a.php?b=$1; } теперь URL намного короче и удобнее предыдущий: mysite.com/r/a.php?b=123456 Текущий: mysite.com/r/123456 порядок тоже важен, он должен идти после конфигурации fastcgi. Спасибо всем за вашу помощь.
Обсуждают сегодня