Welcome! Log In Create A New Profile

Advanced

Re: redirect to a .php file with try_files if required .php file not found

ST
March 18, 2018 05:42AM
Thank you for the detailed clarification!


On Fri, 2018-03-16 at 09:26 +0000, Francis Daly wrote:
> On Thu, Mar 15, 2018 at 01:32:34PM +0200, ST wrote:
>
> Hi there,
>
> > maybe I pasted too much of my config, basically the important line is:
> >
> > try_files $uri /virtual_new.php =404;
>
> The try_files documentation is at http://nginx.org/r/try_files
>
> It is not clear to me what specific response you want, to a particular request.
>
> I would expect that something like
>
> try_files $uri /virtual_new.php;
>
> or
>
> try_files $uri @php_missing;
>
> would be better; but it does depend on what you want.
>
> So: if I request /not-there.php should I get a http 301 redirect to
> /virtual_new.php, or should I get the http 200 response as if I had
> requested /virtual_new.php, or should I get a http 404 response but with
> content from /virtual_new.php, or should I get something else?
>
> And: if I request /not-there.php/extra, what response should I get?
>
> f

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

redirect to a .php file with try_files if required .php file not found

ST March 15, 2018 07:34AM

Re: redirect to a .php file with try_files if required .php file not found

Francis Daly March 16, 2018 05:28AM

Re: redirect to a .php file with try_files if required .php file not found

ST March 18, 2018 05:42AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 180
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