community server SiteUrls.config and vanity - SnippetGood most recent 30 from http://snippetgood.com2010-07-30T00:00:57Zhttp://snippetgood.com/feeds/question/100http://www.creativecommons.org/licenses/by-nc/2.5/rdfhttp://snippetgood.com/questions/100/community-server-siteurls-config-and-vanitycommunity server SiteUrls.config and vanityGreg2009-10-15T19:41:53Z2009-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><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" />
</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#144Answer by Muto for community server SiteUrls.config and vanityMuto2009-11-04T20:57:46Z2009-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>