Category-slug/Product-slug on Product Detail Rewrite

Topics: Developer Forum, Project Management Forum, User Forum
Jan 8, 2009 at 5:41 AM
Edited Jan 8, 2009 at 7:31 AM
Hi All,

I wanted some advice on how to best write the following scenario.

I have the following rules currently written:
Real URL: index.cfm?page=listing&categoryslug=category-slug
Real URL: index.cfm?page=content-slug

I'd like to have as my final product URL.

How would i go about adding the above from the Real URL:

I have the following script so far:

RewriteRule ^/shop/([a-zA-Z0-9_-]+)$ /index.cfm?page=$1
RewriteRule ^/([a-zA-Z0-9_-]+)\.html$ /index.cfm?page=listing&categoryslug=$1
RewriteRule ^/([0-9]+)/([0-9]+)/([a-zA-Z0-9_-]+)\.html$ /index.cfm?page=listing&categoryslug=$3&StartRow=$2&PageNum=$3
MaxMatchCount 50

I need to add variables like productrequest=1 into the chain also.

Any advice on how to optimise the current script is welcome.