0

I am seeing a statement on nginx config but can't figure out what it does. this works when I am at the main directory under path; however, when I try to access files in subdirectories, it doesn't work. What does this mean and how would I change it to fix the issue with accessing subdirectories?

if (!-e $request_filename) { rewrite ^ /path/index.php last; }
1

this checks whether there is a file, directory, or symbolic link that matches the $request_filename. If such a file is not found, the connection is being redirected to /path/index.php.

Statements like these are normally used to allow url rewriting (pretty URLS) and serving of static files.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.