Welcome! Log In Create A New Profile

Advanced

remove if from code

April 25, 2017 04:16PM
I am using Nginx 1.13 and have read that using "if" is a poor solution. I have looked through my configuration file and found one and would like to rewrite it without the "if". Does anyone know how to rewrite this snippet?

## Execute PHP Scripts using FastCGI
location ~ \.php(/.*)? {
if (!-e $request_filename) {
rewrite / /index.php last;
}

Thanks
Subject Author Posted

remove if from code

tommygunner April 25, 2017 04:16PM

Re: remove if from code

Reinis Rozitis April 26, 2017 06:56AM

Re: remove if from code

tommygunner April 26, 2017 01:09PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 317
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready