В файле .htaccess, как выяснилось, были такие правила:
RewriteRule ^page/([0-9]+)/$ index.php?page=$1 [L,QSA]
RewriteRule ^cat/([0-9]+)/(.*)/([0-9]+)/$ cat.php?id=$1&name=$2&page=$3 [L,QSA]
RewriteRule ^cat/([0-9]+)/(.*)/$ cat.php?id=$1&name=$2 [L,QSA]
RewriteRule ^collections/$ collections.php [L,QSA]
RewriteRule ^collections/([0-9]+)/$ collections.php?page=$1 [L,QSA]
RewriteRule ^search/(.*)/([0-9]+)/$ search.php?q=$1&page=$2 [L,QSA]
RewriteRule ^search/(.*)/$ search.php?q=$1 [L,QSA]
Для Nginx правила будут такими:
rewrite ^/page/([0-9]+)/$ /index.php?page=$1 last;
rewrite ^/cat/([0-9]+)/(.*)/([0-9]+)/$ /cat.php?id=$1&name=$2&page=$3 last;
rewrite ^/cat/([0-9]+)/(.*)/$ /cat.php?id=$1&name=$2 last;
rewrite ^/collections/$ /collections.php last;
rewrite ^/collections/([0-9]+)/$ /collections.php?page=$1 last;
rewrite ^/search/(.*)/([0-9]+)/$ /search.php?q=$1&page=$2 last;
rewrite ^/search/(.*)/$ /search.php?q=$1 last;