<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>HttpHandlers and HttpModules</title><link>http://forums.asp.net/27.aspx</link><description>Extending the ASP.NET Framework through HttpModules and HttpHandlers.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Url Rewriting - Some advice please?  :-)</title><link>http://forums.asp.net/thread/3264759.aspx</link><pubDate>Mon, 29 Jun 2009 17:08:56 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3264759</guid><dc:creator>jamesqua</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3264759.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=27&amp;PostID=3264759</wfw:commentRss><description>&lt;p&gt;Path is a class in the System.IO namespace so this will work System.IO.Path.GetFileNameWithoutExtension(strCurrentPath)&lt;/p&gt;</description></item><item><title>Re: Url Rewriting - Some advice please?  :-)</title><link>http://forums.asp.net/thread/3264522.aspx</link><pubDate>Mon, 29 Jun 2009 15:08:31 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3264522</guid><dc:creator>scooner</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3264522.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=27&amp;PostID=3264522</wfw:commentRss><description>&lt;p&gt;HI,&lt;/p&gt;
&lt;p&gt;THanks for the link - it makes sense, however when I convert the code to VB i get an error on the word path on the line &amp;quot;Path.GetFileNameWithoutExtension(strCurrentPath)&amp;quot; - it says that&amp;nbsp;&amp;quot;name path is not declared&amp;quot; should it be a different word?&lt;/p&gt;
&lt;p&gt;does that make sense or am i just doing something stupid?&lt;/p&gt;
&lt;p&gt;Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim strCurrentPath As String&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim strCustomPath As String&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strCurrentPath = Request.Path&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strCurrentPath = strCurrentPath.ToLower()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39; the URL contains this folder name&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If strCurrentPath.IndexOf(&amp;quot;/SomeSubFolder/&amp;quot;) &amp;gt; -1 Then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strCustomPath = &amp;quot;getContent.aspx?id=&amp;quot; &amp;amp; Path.GetFileNameWithoutExtension(strCurrentPath)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39; rewrite the URL&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Context.RewritePath(strCustomPath)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;/p&gt;
&lt;p&gt;thanks,&lt;/p&gt;
&lt;p&gt;Scott&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Url Rewriting - Some advice please?  :-)</title><link>http://forums.asp.net/thread/3264333.aspx</link><pubDate>Mon, 29 Jun 2009 13:39:33 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3264333</guid><dc:creator>jamesqua</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3264333.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=27&amp;PostID=3264333</wfw:commentRss><description>&lt;p&gt;Using the global.asax is a pretty straightforward way to do this.&amp;nbsp; Here is an example.&amp;nbsp; &lt;a href="http://www.csharpfriends.com/Articles/getTip.aspx?articleID=215"&gt;http://www.csharpfriends.com/Articles/getTip.aspx?articleID=215&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Url Rewriting - Some advice please?  :-)</title><link>http://forums.asp.net/thread/3264290.aspx</link><pubDate>Mon, 29 Jun 2009 13:19:45 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3264290</guid><dc:creator>scooner</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3264290.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=27&amp;PostID=3264290</wfw:commentRss><description>&lt;p&gt;Hi All,&lt;/p&gt;
&lt;p&gt;I was just wondering whether somebody could point me in the right direction.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve developed a solcial networking website that uses profiles. I am wanting users to choose a nickname that can be used to access their profile.&lt;/p&gt;
&lt;p&gt;e.g. &lt;a href="http://www.website-address-here.co.uk/nickname-here"&gt;www.website-address-here.co.uk/nickname-here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;rather than having &lt;a href="http://www.website-address-here.co.uk/Profile.aspx?profileID=xxx"&gt;www.website-address-here.co.uk/Profile.aspx?profileID=xxx&lt;/a&gt; etc.&lt;/p&gt;
&lt;p&gt;What would be the best way to achieve this? I&amp;#39;m not sure which would be the best solution.&lt;/p&gt;
&lt;p&gt;Any advice would be great,&lt;/p&gt;
&lt;p&gt;thanks very much,&lt;/p&gt;
&lt;p&gt;Scott.&lt;/p&gt;</description></item></channel></rss>