but our some of the pages have querystring parameters ... say http://mydomain.com/page.aspx?cat=2 which I want to display as http://mydomain.com/page/2/ and also it should show proper results. So is there any package available in umbraco? or is there any setting to be done?
If you really need to do this type of querystring rewritting you can use the built in URL Rewritting to do this. Edit URLRewritting.config in the root config folder and add something like this:
I tried this. it is not directly converting my url with querystring say default.aspx?page=1 to default/1/ ... but if I manualy write in addrssbar like dafault/1/ then it shows result properly ... but how can it automatically convert default.aspx?page=1 to default/1/ ?
it means that wherever I have specified default.aspx?cat=high&page=2 ... I have to replace that with Default/high/2/ ? i.e. in my C# code? as I am using .net user control.
user friendly urls
hello...
I am using umbraco 4.7. For user-friendly urls, have followed information of http://our.umbraco.org/wiki/install-and-setup/setting-up-umbraco-for-friendly-urls link. so now http://mydomain.com/page.aspx works with url http://mydomain.com/page/ .
but our some of the pages have querystring parameters ... say http://mydomain.com/page.aspx?cat=2 which I want to display as http://mydomain.com/page/2/ and also it should show proper results. So is there any package available in umbraco? or is there any setting to be done?
If you really need to do this type of querystring rewritting you can use the built in URL Rewritting to do this. Edit URLRewritting.config in the root config folder and add something like this:
<xsl:variable name="cat"><xsl:value-of select="umbraco.library:RequestQueryString('cat')"/></xsl:variable>
I tried this. it is not directly converting my url with querystring say default.aspx?page=1 to default/1/ ... but if I manualy write in addrssbar like dafault/1/ then it shows result properly ... but how can it automatically convert default.aspx?page=1 to default/1/ ?
Hi, I am not sure exactly what you mean? How are you outputting your links (XSLT, Razor) and where does the identifier in your querystring come from?
Perhaps if you could post some code samples we can help you further.
I have .net usercontrol in which I am using querystring parameters.. with response.redirect .... not in xslt or razor
hey any further clue?
Surely if you redirecting from within a usercontrol you can redirect to your preferred url route rather that using the querystring i.e.:
Response.Redirect(string.Format("default/{0}/", page));
ok.. .will try and revert
Yes, exactly, you need to output these custom URL's yourself, the NiceURL method will not generate these for you.
Jeavon,
it means that wherever I have specified default.aspx?cat=high&page=2 ... I have to replace that with Default/high/2/ ? i.e. in my C# code? as I am using .net user control.
Yes, that is exactly right
ok.. will do that.... and revert
is working on a reply...