community server SiteUrls.config and vanity - SnippetGood most recent 30 from http://snippetgood.com 2010-07-30T00:00:57Z http://snippetgood.com/feeds/question/100 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://snippetgood.com/questions/100/community-server-siteurls-config-and-vanity community server SiteUrls.config and vanity Greg 2009-10-15T19:41:53Z 2009-11-04T20:57:46Z <p>How can I manipulate the vanity element in a url node? This is more of a general question, because I know I can get by with vanity={2}, but a lack of proper understanding is holding me back from truly mastering my community server site.</p> <p>I've seen examples like this in the SiteUrls.config: </p> <pre><code>&lt;url name="post_InPage_Old" path = "{0}/ShowThread.aspx#{1}" pattern = "(\d+)/ShowThread.aspx" vanity="{2}?PostID=$1^PermaPost=$2^UrlName=permalink" page="ForumUrlHandler.ashx" /&gt; </code></pre> <p>but the format confuses me. What are the $1 and $2? Where are they set?</p> http://snippetgood.com/questions/100/community-server-siteurls-config-and-vanity/144#144 Answer by Muto for community server SiteUrls.config and vanity Muto 2009-11-04T20:57:46Z 2009-11-04T20:57:46Z <p>$1 and $2 represent that matched set (anything with '()' ) found in the regular expression (pattern). More info about matched sets found here <a href="http://www.webreference.com/js/column5/backreferences.html" rel="nofollow">http://www.webreference.com/js/column5/backreferences.html</a></p>