Welcome! Log In Create A New Profile

Advanced

Re: index and location not working together properly?

Maxim Dounin
July 26, 2013 11:26AM
Hello!

On Fri, Jul 26, 2013 at 11:19:45AM +0100, Ian Hobson wrote:

[...]

> root /home/ian/websites/reseller/htdocs;
> # if / then redirect to index.php
> location = / {
> # serve /index.php
> rewrite ^$ /index.php last;

The rewrite here does nothing as only URI "/" may appear here, and
it's not matched by the "^$" pattern.

You probably want to change it to

rewrite ^ /index.php last;

[...]

--
Maxim Dounin
http://nginx.org/en/donation.html

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

index and location not working together properly?

Ian Hobson July 26, 2013 06:22AM

Re: index and location not working together properly?

Maxim Dounin July 26, 2013 11:26AM

Re: index and location not working together properly?

Ian Hobson July 26, 2013 03:52PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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