jgd12345 Posted December 29, 2005 Share Posted December 29, 2005 Hi, i'm useless at regular expressions and having trouble implement mod_rewrite to make my site search engine friendly. The url I want to rewrite is: /products/index.php?category_id=$cid(&page=$page)? to: /products/[a-zA-Z0-9-/]*/([0-9]+)$/? (something like this - i've read alot of tutorials but can't get my head around it) eg /products/cat-1/subcat-1/subcat-2/12/ or /products/cat-1/subcat-1/subcat-2/12 (with or without the ending slash) or /products/cat-1/subcat-1/subcat-2/12/1 (including the page number - again with or without the ending slash) note: the 12 is the category_id and the 1 is the page and: /products/product.php?product_id=$pid to: /products/cat-1/subcat-1/subcat-2/product-name/19 (again with or without the ending slash) note: the 19 is the product_id. Would appreciate it if someone could help. Thanks Link to comment https://forums.phpfreaks.com/topic/3116-mod-rewrite-help/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.