Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

try_files not working as expected

$
0
0
Hi,

location /some/location/ {
try_files $uri /api.php?r=$request_uri;
}

Is working perfectly. It does process domain.com/some/location/ as domain.com/api.php?r=/some/location/ (.php files processed in other location).

But

location /some/location/ {
try_files $uri /api.php?r=$request_uri =404;
}

Is always returning 404 error code.
Why this happening? What I am doing wrong?

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>