Jump to content


This topic is now archived and is closed to further replies.


Mod Rewrite Help

Recommended Posts

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/[a-zA-Z0-9-/]*/([0-9]+)$/? (something like this - i've read alot of tutorials but can't get my head around it)




/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








/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

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.