My current code is
RewriteRule ^(.*)$ index.php?pg=$1 [L,QSA]
index.php?action=product shop.com/product
index.php?action=product/add shop.com/product/add
Now I want to add paging to some of the pages, something like
index.php?action=product&page=1&show=20 shop.com/product/1/20
index.php?action=product/add&page=1&show=20 shop.com/product/add/1/20
How do I do this?
RewriteEngine On
RewriteRule ^product$ index.php?action=product
RewriteRule ^product/add$ index.php?action=product/add
RewriteRule ^product/(\d+)/(\d+)$ index.php?action=product&page=$1&show=$2
RewriteRule ^product/add/(\d+)/(\d+)$ index.php?action=product/add&page=$1&show=$2
I suggest taking a look at this answer too. I think it would be better in this case.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With