search

Home  >  Q&A  >  body text

Solving nginx location configuration problems


(1)

 if ($fastcgi_script_name ~ "^(.+\.php)(/.+)$"){
    set $path_info ;
 }

(2)

  if ($fastcgi_script_name ~ "^index.php/(.+)$"){
    set $path_info ;
 }

Access address test.com/index.php/oss/index

(1) $2 = /oss/index
(2) $1 does not have any data

(1)(2) I feel the same, but the writing method is different. Why are the results different? ? ? Waiting online

给我你的怀抱给我你的怀抱2844 days ago530

reply all(1)I'll reply

  • 过去多啦不再A梦

    过去多啦不再A梦2017-05-16 17:18:36

    Is there a slash missing before index

    reply
    0
  • Cancelreply