Rewrite to fix a wrong Elgg url

Hi!, how can I rewrite this url:

../pages/owner/group:2533

to

../pages/group/2533/all

I´ve tried with 

rewrite ^pages/owner/group:([0-9]+)$ /pages/group/$1/all last;

but dont works. Any sugestion??

I´ve Nginx and Elgg 1.8