Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hello,
Is it possible to match all the url without creating it into the backend?
I need to match every products with a specific url and display a specific page for it. For example, the urls
- /Products/Product1
- /Products/Product2
...
Regards,
Yes, you can do this by adding the following to your config/urlrewriting.config:
<add name="accomrewrite" virtualUrl="^~/products/(.*)" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/products?search=$1" ignoreCase="true" />
Then in your xslt or Razor script you can access the query string e.g.
<xsl:variable name="search" > <xsl:value-of select="Exslt.ExsltStrings:lowercase(umbraco.library:RequestQueryString('search'))"></xsl:value-of> </xsl:variable>
Ok super I will test it then :)
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
'Wildcard' url
Hello,
Is it possible to match all the url without creating it into the backend?
I need to match every products with a specific url and display a specific page for it. For example, the urls
- /Products/Product1
- /Products/Product2
...
Regards,
Yes, you can do this by adding the following to your config/urlrewriting.config:
Then in your xslt or Razor script you can access the query string e.g.
<xsl:variable name="search" >
<xsl:value-of select="Exslt.ExsltStrings:lowercase(umbraco.library:RequestQueryString('search'))"></xsl:value-of>
</xsl:variable>
Ok super I will test it then :)
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.