title: Nginx redirection on paginations
body: <p>I am trying to using Nginx to redirect from <code>/t/latest/2</code> to <code>/topics/latest/page/2</code></p>
  
  <pre><code>rewrite ^/t/latest$      /topics/latest permanent;
  rewrite ^/t/latest/(.*)$      /topics/latest/page/$1 permanent;
  </code></pre>
  
  <p>This works well, but I am wondering if there is a smarter way to do this in one rule? This is because there are many redirects like this and it would be nice if I can cut the redundancy.</p>