I have a series of price lists from different manufacturers (spat out from the database). They are limited to 100 lines per page, i.e.:
www.domain.com/products/price-lists/company1.php?page=2 www.domain.com/products/price-lists/company2.php?page=10
which I want to rewrite to:
www.domain.com/products/price-lists/company1/page/2 www.domain.com/products/price-lists/company2/page/10
I have:
Options +FollowSymlinks RewriteEngine On RewriteBase / RewriteRule ^products/price-lists/company1/page/([0-9]+)/?$ products/price-lists/company1.php?page=$1 [NC,L] RewriteRule ^products/price-lists/company2/page/([0-9]+)/?$ products/price-lists/company2.php?page=$1 [NC,L]
First of all, this calls 404 if I try to go to / products / prices -lists / company1 / page / 2 (it works if I delete / page /), and secondly, I was wondering if I can combine them in any rule:
(company1|company2[0-9]+)/?
Thanks for any help (this is my first attempt at mod_rewrite!)
source share