I have an e-commerce website (created with a ecommercetemplates shopping cart PHP template) and on the catalogue pages there are, at times, a few pages which are numbered at the bottom. The links to these pages are, for example, in the form:- /product.php?cat=27&pg=2
despite the main page having been mapped to:- /widgets
using a rewrite rule in a .htaccess file.
For the sake of consistency and simplicity, I would like the pages to be as:- /widgets?pg=2
. I asked in this forum how to do this and found the following solution:-
RewriteRule ^widgets$ products.php?cat=27 [QSA]
The problem is that despite the above rewrite rule working as I wanted, the current links on the catalogue page still point to, for example:- /product.php?cat=27&pg=2
. In order to go to /widgets?pg=2
, I have to enter this in the browser.
So my question is: How do I change the current links on the catalogue page, which are dynamically generated? Are there any further rules which can be entered in .htaccess or is there any other solution to this problem? The following is the PHO code for the product page:- http://freetexthost.com/3ubiydspzm.
In the link above, if you do a search for 'writepagebar', I think this is where the 'next page', 'previous page', and the 'page numbers' are done.