Updating some old "if" statements

Ian M. Evans ianevans at digitalhit.com
Sat Sep 29 20:47:27 UTC 2012


On Fri, September 28, 2012 7:15 am, Edho Arief wrote:
>> Location #1:
>>
>> location ~ /(photos|profile|review|profiles|reviews|news)(/|$) {
>> if ($uri ~ ^(.*/(photos|profile|review|profiles|reviews|news))($|/.*)) {
>> rewrite ^(.*/(photos|profile|review|profiles|reviews|news))($|/.*)
>> $1.php?mypath=$3 last;
>> }
>> }
>>
>
> just remove the if().

Strangely, when I removed the "if" on this one and just had the rewrite, I
started getting 404 errors.



More information about the nginx mailing list