1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Query String Parameters

Query String Parameters

3 posts, 0 answered
  1. David
    David avatar
    16 posts
    Registered:
    10 Apr 2012
    10 Apr 2012
    Link to this post
    I'm creating a search from some SQL Server tables.  I have the search working and here is a brief walkthrough.

    StartSearchPage  the user clicks a link and some querystring variables are passed.  It goes to /searchResultspage?productCategory=Variable1&productID=Variable2

    My question is how can I optimize this for SEO?  I want the dynamic url to instead be
    searchResultspage/(the value of the productCategory query string)/(the value of the productID query string) 
    here are some basic examples:
    www.whatever.com/searchResultspage/shoes/1965
    www.whatever.com/searchResultspage/belt/2012 
     
    And then I want to grab those items from the URL.  I've tried this, but I get a page not found error.  What's the best way to dynamically generate URLS without using querystrings?



  2. David
    David avatar
    16 posts
    Registered:
    10 Apr 2012
    12 Apr 2012
    Link to this post
    Any ideas?  I tried IIS 7 URL rewrite, but that didn't work.
  3. Tony
    Tony avatar
    20 posts
    Registered:
    12 Oct 2012
    11 Oct 2012 in reply to David
    Link to this post
    A little late for a reply maybe but..
    http://www.sitefinity.com/devnet/forums/general-discussions-/httphandler-not-working

    You need the Telerik.Sitefinity.Web library for RouteHelper.
                RouteHelper.SetUrlParametersResolved(true);
                string urlParams = this.GetUrlParameterString(true);
                if (!String.IsNullOrEmpty(urlParams))
                {
                    lblURL.Text = urlParams;
                }
                else
                    lblURL.Text = "No Params";
3 posts, 0 answered