Query String Parameters

Posted by Community Admin on 04-Aug-2018 17:01

Query String Parameters

All Replies

Posted by Community Admin on 10-Apr-2012 00:00

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?



Posted by Community Admin on 12-Apr-2012 00:00

Any ideas?  I tried IIS 7 URL rewrite, but that didn't work.

Posted by Community Admin on 11-Oct-2012 00:00

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";

This thread is closed