I presently have these pages:

http://xxx.com/category/page/123/test-test
http://xxx.com/category/page/2563/test2-test
http://xxx.com/category/page/2853/test2-test

I wish to 301 redirect these to this:

http://xxx.com/page/123/test-test
http://xxx.com/page/2563/test2-test
http://xxx.com/page/2853/test2-test

How do you do them and so i do not do it for those pages 1 by 1.

EDIT:

I've got a couple of lines below too:

# Turn on URL rewriting
RewriteEngine On

# Installation directory
RewriteBase /

#this is where I plan to put my rewrite text

RewriteRule ^(system) - [F,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Rewrite all other URLs to index.php/URL
RewriteRule .* index.php/$0 [PT,L]

you shoud use mod rewrite for this function

something similar to this will get it done

RewriteEngine on
RewriteRule ^(system) - [F,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Rewrite all other URLs to index.php/URL
RewriteRule ^/category/page/(\d+)/(.*)$ /page/$1/$2 [R=301,NC]
RewriteRule .* index.php/$0 [PT,L]

you are able to evaluate the documention of mod rewrite