Now there is such a demand. I have deployed several static HTML on nginx, but I want to intercept when accessing these static pages. After intercepting, I will judge something and then display the page (for example Inappropriate examples are: judge the requested IP and decide whether to go to this page). The current situation is quite strange. I cannot put these pages in a certain web program and intercept them through this program. I can only statically deploy the pages. Is there any way to solve this problem?
怪我咯2017-05-16 17:18:24
What does "judge something and then display the page" mean? What content do you want in nginx
里动态修改html
?
Added:
Well, it can indeed be done (although I am not an expert), but I have seen others do it (nginx
里可以写if
), so it is completely OK to "judge" some things. Here is a link to someone's explanation: nginx-check