index and location not working together properly?
Maxim Dounin
mdounin at mdounin.ru
Fri Jul 26 15:25:12 UTC 2013
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
More information about the nginx
mailing list