multiple variables passed in query string... cant work it out

Topics: Developer Forum
Mar 12, 2010 at 4:16 AM


This is probably a very basic thing to do... however Im struggling to figure out how to pass in multiple variables

I have an online store.

When my users try to view the product listings in my site they go to a page called /shop/category-name

as you can see below the category name is the $1

RewriteRule ^/shop/(.*)$ /index.cfm?go=shop.products&content=$1

My users may also have 10 pages of products to go through to find the product they desire.

I am hoping to use the following

/shop/category-name/page/10/ etc

I was hoping i could simply modify the URL rewrite to consist of the following

RewriteRule ^/shop/(.*)$ /index.cfm?go=shop.products&content=$1&page=$2


I am finding that my server is not interpreting the query string as seperate variables as i do require the category name to be passed into my page and also the page number as seperate variables.

I am currently using CF8 as my server side processor but cannot figure out for the life of me how to pass in multiple variables.

if anyone knows can you please show me the light.

thanks in advance


Mar 12, 2010 at 10:27 AM

There is a lot of light in the documentation.

Start with the page on RewriteRule.  The third example on that page shows you how to do what you want.

But don't stop at just one page.  There's a ton of good stuff in the documentation.