Answer the question
In order to leave comments, you need to log in
How to redirect all requests to one nginx file?
Hello, earlier on apache, I had all requests to the site redirected to one php file, and from there this script already decided which page to render based on the URL, so how to make absolutely all requests go to one file on nginx?
But not including requests that go to ajax, css, img, resources directories and robots.txt + sitemap.xml files in the main directory.
That is, if there is a request for /news or /news/1.png, everything processes one main file, but if there is a request for /img/1.png or /css/main.css, then this file must be opened.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question