nginx rewrite rules conditional once again

Edho P Arief edhoprima at gmail.com
Tue Jun 29 19:35:16 MSD 2010


On Tue, Jun 29, 2010 at 10:27 PM, Malte Geierhos <malte at snapscouts.de> wrote:
> My next idea was to try to catch $2/$3 and see if its a number
>
> like :
>
> location ~* ^/(articles|people)/(.*)$ {
>         if ( $request_arg !~  [0-9]) {
>               rewrite ^/(articles|people)/(.*)$  /$1/$2/1/25;
>        }
> }
>
> hm but now i'm stuck.
> Anyone got an idea ?
>

location ~* ^/(articles|people)/([^0-9]+)$ { ... }

-- 
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org



More information about the nginx mailing list