重定向初始页面有效,但下一页显示浏览器中的旧URL

I have the following .htaccess code:

RewriteEngine On
RewriteBase /


RewriteCond %{THE_REQUEST} \s/+Category\.php\?pageNum_RS_Search=([^\s&]+)&totalRows_RS_Search=([^\s&]+)&Category=([^\s&]+) [NC]
RewriteRule ^ /Compare/page/%1/%1/%1? [R=301,L]

RewriteCond %{THE_REQUEST} \s/+Category\.php\?Category=([^\s&]+) [NC]
RewriteRule ^ /Compare/%1? [R=301,L]

RewriteCond %{THE_REQUEST} \s/+product\.php\?id=([^\s&]+) [NC]
RewriteRule ^ %1? [R=301,L]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)?$ product.php?id=$1 [L,QSA]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^Compare/([^/]+)/?$ Category.php?Category=$1 [L,QSA]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^Compare/page/([^/]+)/([^/]+)/([^/]+)/?$ Category.php?pageNum_RS_Search=$1&totalRows_RS_Search=$2&Category=$3 [L,QSA] 

The redirect for the Category.php?Category=.. works fine, but when I want to go to the next page of this category so keeping ^Compare/Category name to the next page with this code gives me ^Compare/page/1/1/1 and as a result the next page is looking for category 1, it should be looking for category category name. Is there a way to show: ^Compare/page/1/8/Category name? The eight is just a number of the total rows the 1 is obviously the page number and the Category is the Category name. The next page is created with dreamweavers navigation bar using php. Any help welcome

This is due to your faulty very first rule where your are using %1 again & again instead of %2 and %3.

It should be this:

RewriteCond %{THE_REQUEST} \s/+Category\.php\?pageNum_RS_Search=([^&]+)&totalRows_RS_Search=([^&]+)&Category=([^\s&]+) [NC]
RewriteRule ^ /Compare/page/%1/%2/%3? [R=301,L]