Quick Nav:  Online Store   |   Login | Register

Need to strip confusing & unecessary parameters out of CATALook product page URLs

Rate this topic:

Please Register to post a reply. Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.
AuthorMessages
Laurence Neville
<100 Posts
Posts:73


06/09/2008 6:17 PM  

Here's the problem:

I have a CATALook site with many product pages (i.e. each containing an ItemPane module). Each page is configured to show a specific CATALook CategoryID. When a page is opened CATALook forces a 302 redirect to a URL in this form:

/MENS/BRAND/Hackett/tabid/3017/List/0/CategoryID/240/Level/a/Default.aspx?SortField=ISBN,ProductName

Google has now indexed these URLs, but since then I have changed the CategoryID associated with each page. Now the above URL generates a "No products found" message (because the CategoryID is wrong). The correct URL is:

/MENS/BRAND/Hackett/tabid/3017/List/0/CategoryID/2134/Level/a/Default.aspx?SortField=ISBN,ProductName

However, the perfect URL for the page, in my opinion, would not contain any of the CATALook parameters (List, CategoryID, Level, SortField). It would be the URL that just takes you to the TabID of the page, i.e.:

/MENS/BRAND/Hackett/tabid/3017/Default.aspx

Could PB intercept a request for a URL with all the CATALook-added parameters and strip them out before passing it to DNN to process? Or is this a case where PB could force a 301 redirect to my "ideal" URL?

Laurence Neville
<100 Posts
Posts:73


06/11/2008 10:06 AM  
FYI, there are dozens of these pages that I would like to redirect, so I'm looking for a way to strip out the List/n/CategoryID/nnnn/Level/a part of the URL where n and nnnnn are any numbers.
John Mitchell
Posts:3238


06/11/2008 10:16 AM  
Hi Laurence,
I'm actually working on something that will handle this.
I have a request from a couple of module vendors to help make their Urls much shorter and friendlier.

It's proving kind of difficult, but I think I can come up with a way to create a Rewrite Rule that will do the replacement, redirect and/or rewrite.
Laurence Neville
<100 Posts
Posts:73


06/11/2008 11:46 AM  
OK, sounds promising!
In the mean time, I am seeing if I can can use SiteUrls.config to do the job. I am not looking to rewrite the URLs "on the way out" for SEO purposes - I want to rewrite them "on the way in", i.e. get a request for /MENS/BRAND/Hackett/tabid/3017/List/0/CategoryID/2134/Level/a/Default.aspx?SortField=ISBN,ProductName to be seen by DNN as a request for /MENS/BRAND/Hackett/tabid/3017/Default.aspx
John Mitchell
Posts:3238


06/11/2008 11:58 AM  

You can create Rewrite Rules manually in the SiteUrls.config, but that system typically goes the other way.

For SEO you want the shorter URL coming in, which will be turned into the longer Url for DNN (and then Catalook) to process.

I actually use SiteUrls.config for some of my Urls now.  For example: http://www.snapsis.com/PageBlaster.aspx

That is actually rewritten internally to ~/Default.aspx?tabid=589&amp;ProductID=23&amp;List=1 using SiteUrls.config

Laurence Neville
<100 Posts
Posts:73


06/11/2008 12:16 PM  

Right, so I was thinking I could do something like this:

rewriterrule
lookfor  .*/MENS/BRAND/Hackett/tabid/3017/List/0/CategoryID/2134/Level/a/Default.aspx /lookfor
sendto  ~/MENS/BRAND/Hackett/tabid/3017/Default.aspx /sendto
/rewriterrule


(with some RegEx to deal with all TabIDs/List/CategoryIDs dynamically)

Again, this is not an exercise in outputting friendly URLs. Google has a bunch of URLs in its index in the LookFor format above, and because the CategoryID parameter is wrong in those URLs, the page shows "No Products Found". If I could get these incoming URLs to be processed by DNN (and then Catalook) in the SendTo format above (i.e. with the List/n/CategoryID/nnnn/Level/a part of the URL stripped out), then the page would display correctly.

Laurence Neville
<100 Posts
Posts:73


06/12/2008 9:06 AM  
I just now got it working using SiteURLs.config. It ended up being a more complex rule than I assumed above, but SiteURLs.config was the answer.
Please Register to post a reply. Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.
Forums >Snapsis Product Support >PageBlaster > Need to strip confusing & unecessary parameters out of CATALook product page URLs



ActiveForums 3.7
Powered by: Snapsis Software