<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>UC&#039;s Corner &#187; url rewriting</title>
	<atom:link href="http://yussi.nl/index.php/category/url-rewriting/feed" rel="self" type="application/rss+xml" />
	<link>http://yussi.nl</link>
	<description>Yussi Ariefiyono</description>
	<lastBuildDate>Fri, 25 Jun 2010 12:57:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Fixing the problems in url rewriting asp.net</title>
		<link>http://yussi.nl/index.php/fixing-the-problems-in-url-rewriting-asp-net.html</link>
		<comments>http://yussi.nl/index.php/fixing-the-problems-in-url-rewriting-asp-net.html#comments</comments>
		<pubDate>Mon, 27 Apr 2009 15:46:00 +0000</pubDate>
		<dc:creator>yussi ariefiyono</dc:creator>
				<category><![CDATA[asp.net]]></category>
		<category><![CDATA[url rewriting]]></category>

		<guid isPermaLink="false">/post/Fixing-the-problems-in-url-rewriting-aspnet.aspx</guid>
		<description><![CDATA[postbacks while using URLRewriter.net

solution:
put this code:
&#60;%@ Register TagPrefix=&#34;url&#34; Namespace=&#34;Intelligencia.UrlRewriter&#34;
Assembly=&#34;Intelligencia.UrlRewriter&#34; %&#62;
and
change &#60;form id=&#34;form1&#34; runat=&#34;server&#34;&#62; to  &#60;url:form runat=&#34;server&#34;&#62;

problem with Google BOT

solution:
add this code in your&#160; App_Browsers/genericmozilla5.browser


&#60;browsers&#62;
&#160; &#60;browser id=&#34;GenericMozilla5&#34; parentID=&#34;Mozilla&#34;&#62;
&#160;&#160;&#160; &#60;identification&#62;
&#160;&#160;&#160;&#160;&#160; &#60;userAgent match=&#34;Mozilla/5\.(?&#39;minor&#39;\d+).*[C&#124;c]ompatible; ?(?&#39;browser&#39;.+); ?\+?(http://.+)\)&#34; /&#62;&#60;/identification&#62;
&#160;&#160;&#160; &#60;capabilities&#62;
&#160;&#160;&#160;&#160;&#160; &#60;capability name=&#34;majorversion&#34; value=&#34;5&#34; /&#62;
&#160;&#160;&#160;&#160;&#160; &#60;capability name=&#34;minorversion&#34; value=&#34;${minor}&#34;/&#62;
&#160;&#160;&#160;&#160;&#160; &#60;capability name=&#34;browser&#34; value=&#34;${browser}&#34; /&#62;
&#160;&#160;&#160;&#160;&#160; &#60;capability name=&#34;Version&#34; value=&#34;5.${minor}&#34; /&#62;
&#160;&#160;&#160;&#160;&#160; &#60;capability name=&#34;activexcontrols&#34; value=&#34;true&#34; /&#62;
&#160;&#160;&#160;&#160;&#160; &#60;capability <a href="http://yussi.nl/index.php/fixing-the-problems-in-url-rewriting-asp-net.html" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<h1><strong>postbacks while using URLRewriter.net</strong></h1>
<p>
<strong>solution:</strong><br />
put this code:<br />
<em>&lt;%@ Register TagPrefix=&quot;url&quot; Namespace=&quot;Intelligencia.UrlRewriter&quot;<br />
Assembly=&quot;Intelligencia.UrlRewriter&quot; %&gt;</em><br />
and<br />
change <em>&lt;form id=&quot;form1&quot; runat=&quot;server&quot;&gt;</em> to <em> &lt;url:form runat=&quot;server&quot;&gt;</em>
</p>
<h1>problem with Google BOT</h1>
<p>
<strong>solution:</strong><br />
add this code in your&nbsp; App_Browsers/genericmozilla5.browser
</p>
<p>
<em>&lt;browsers&gt;<br />
&nbsp; &lt;browser id=&quot;GenericMozilla5&quot; parentID=&quot;Mozilla&quot;&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;identification&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;userAgent match=&quot;Mozilla/5\.(?&#39;minor&#39;\d+).*[C|c]ompatible; ?(?&#39;browser&#39;.+); ?\+?(http://.+)\)&quot; /&gt;&lt;/identification&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;capabilities&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;capability name=&quot;majorversion&quot; value=&quot;5&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;capability name=&quot;minorversion&quot; value=&quot;${minor}&quot;/&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;capability name=&quot;browser&quot; value=&quot;${browser}&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;capability name=&quot;Version&quot; value=&quot;5.${minor}&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;capability name=&quot;activexcontrols&quot; value=&quot;true&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;capability name=&quot;backgroundsounds&quot; value=&quot;true&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;capability name=&quot;cookies&quot; value=&quot;true&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;capability name=&quot;css1&quot; value=&quot;true&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;capability name=&quot;css2&quot; value=&quot;true&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;capability name=&quot;ecmascriptversion&quot; value=&quot;1.2&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;capability name=&quot;frames&quot; value=&quot;true&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;capability name=&quot;javaapplets&quot; value=&quot;true&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;capability name=&quot;javascript&quot; value=&quot;true&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;capability name=&quot;jscriptversion&quot; value=&quot;5.0&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;capability name=&quot;supportsCallback&quot; value=&quot;true&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;capability name=&quot;supportsFileUpload&quot; value=&quot;true&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;capability name=&quot;supportsMultilineTextBoxDisplay&quot; value=&quot;true&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;capability name=&quot;supportsMaintainScrollPositionOnPostback&quot; value=&quot;true&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;capability name=&quot;supportsVCard&quot; value=&quot;true&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;capability name=&quot;supportsXmlHttp&quot; value=&quot;true&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;capability name=&quot;tables&quot; value=&quot;true&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;capability name=&quot;vbscript&quot; value=&quot;true&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;capability name=&quot;w3cdomversion&quot; value=&quot;1.0&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;capability name=&quot;xml&quot; value=&quot;true&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;capability name=&quot;tagwriter&quot; value=&quot;System.Web.UI.HtmlTextWriter&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;/capabilities&gt;<br />
&nbsp; &lt;/browser&gt;<br />
&lt;/browsers&gt;<br />
</em></p>
]]></content:encoded>
			<wfw:commentRss>http://yussi.nl/index.php/fixing-the-problems-in-url-rewriting-asp-net.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Simple url rewriting ASP net with URLRewriter.Net</title>
		<link>http://yussi.nl/index.php/simple-url-rewriting-asp-net-with-urlrewriter-net.html</link>
		<comments>http://yussi.nl/index.php/simple-url-rewriting-asp-net-with-urlrewriter-net.html#comments</comments>
		<pubDate>Fri, 24 Apr 2009 13:02:00 +0000</pubDate>
		<dc:creator>yussi ariefiyono</dc:creator>
				<category><![CDATA[asp.net]]></category>
		<category><![CDATA[url rewriting]]></category>

		<guid isPermaLink="false">/post/Simple-url-rewriting-ASP-net-with-URLRewriterNet.aspx</guid>
		<description><![CDATA[
URL Rewriting with URLRewriter.Net 
URL Rewriting has lots of benefits, listing its main benefits


SEO Friendly URL
Secured URL
No need to change bookmark with change in site structure.
	


Before URL Rewriting my URL looks like
http://localhost:2661/URLRewrite2/DynamicPage.aspx?MyTitleId=1

After URL Rewriting URL is changed to 
http://localhost:2661/URLRewrite2/Article/Asp-Net-website-paths-1.aspx

Step-by-Step Explanation
Step 1: Download Binary Files for URLRewriter.Net
Step 2: Add Reference to Binary Files, Right click project <a href="http://yussi.nl/index.php/simple-url-rewriting-asp-net-with-urlrewriter-net.html" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>
<span style="font-weight: bold">URL Rewriting with URLRewriter.Net </span></p>
<p>URL Rewriting has lots of benefits, listing its main benefits
</p>
<ul>
<li>SEO Friendly URL</li>
<li>Secured URL</li>
<li>No need to change bookmark with change in site structure.
	</li>
</ul>
<p>
<span style="font-weight: bold">Before URL Rewriting my URL looks like</span><br />
http://localhost:2661/URLRewrite2/DynamicPage.aspx?MyTitleId=1<br />
<span style="font-weight: bold"><br />
After URL Rewriting URL is changed to </span></p>
<p>http://localhost:2661/URLRewrite2/Article/Asp-Net-website-paths-1.aspx</p>
<p>
<span style="font-weight: bold">Step-by-Step Explanation</span></p>
<p><strong>Step 1</strong>: Download Binary Files for URLRewriter.Net</p>
<p><strong>Step 2:</strong> Add Reference to Binary Files, Right click project &quot;Add Reference&quot; and add binary files.</p>
<p><img src="/image.axd?picture=URL4.JPG" alt="" /></p>
<p><strong>Step 3:</strong> Update Web.Config File to make URLRewriter.Net works.
</p>
<pre class="csharpcode">
<span class="kwrd">&lt;</span><span class="html">configuration</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">configSections</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">section</span> <span class="attr">name</span><span class="kwrd">=&quot;rewriter&quot;</span>
<span class="attr">requirePermission</span><span class="kwrd">=&quot;false&quot;</span>
<span class="attr">type</span><span class="kwrd">=&quot;Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter&quot;</span> <span class="kwrd">/&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">configSections</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">system.web</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">httpModules</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">add</span> <span class="attr">name</span><span class="kwrd">=&quot;UrlRewriter&quot;</span> <span class="attr">type</span><span class="kwrd">=&quot;Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter&quot;</span> <span class="kwrd">/&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">httpModules</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">system.web</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">system.webServer</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">modules</span> <span class="attr">runAllManagedModulesForAllRequests</span><span class="kwrd">=&quot;true&quot;</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">add</span> <span class="attr">name</span><span class="kwrd">=&quot;UrlRewriter&quot;</span> <span class="attr">type</span><span class="kwrd">=&quot;Intelligencia.UrlRewriter.RewriterHttpModule&quot;</span> <span class="kwrd">/&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">modules</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">validation</span> <span class="attr">validateIntegratedModeConfiguration</span><span class="kwrd">=&quot;false&quot;</span> <span class="kwrd">/&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">system.webServer</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">rewriter</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">rewrite</span> <span class="attr">url</span><span class="kwrd">=&quot;~/Article/(.+)-(.+).aspx&quot;</span> <span class="attr">to</span><span class="kwrd">=&quot;~/DynamicPage.aspx?MyTitleId=$2&quot;</span><span class="kwrd">/&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">rewriter</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">configuration</span><span class="kwrd">&gt;</span>
</pre>
<p><strong>Step 4: </strong>Adding Function to Generate SEO Friendly URL from given Title<br />
<!-- code formatted by http://manoli.net/csharpformat/ --></p>
<pre class="csharpcode">
<span class="kwrd">public</span> <span class="kwrd">static</span> <span class="kwrd">string</span> GenerateURL(<span class="kwrd">object</span> Title, <span class="kwrd">object</span> strId)
{
<span class="kwrd">string</span> strTitle = Title.ToString();
<span class="preproc">#region</span> Generate SEO Friendly URL based on Title
<span class="rem">//Trim Start and End Spaces.</span>
strTitle = strTitle.Trim();
<span class="rem">//Trim &quot;-&quot; Hyphen</span>
strTitle = strTitle.Trim(<span class="str">&#39;-&#39;</span>);
strTitle = strTitle.ToLower();
<span class="kwrd">char</span>[] chars = <span class="str">@&quot;$%#@!*?;:~`+=()[]{}|\&#39;&lt;&gt;,/^&amp;&quot;</span><span class="str">&quot;.&quot;</span>.ToCharArray();
strTitle = strTitle.Replace(<span class="str">&quot;c#&quot;</span>, <span class="str">&quot;C-Sharp&quot;</span>);
strTitle = strTitle.Replace(<span class="str">&quot;vb.net&quot;</span>, <span class="str">&quot;VB-Net&quot;</span>);
strTitle = strTitle.Replace(<span class="str">&quot;asp.net&quot;</span>, <span class="str">&quot;Asp-Net&quot;</span>);
<span class="rem">//Replace . with - hyphen</span>
strTitle = strTitle.Replace(<span class="str">&quot;.&quot;</span>, <span class="str">&quot;-&quot;</span>);
<span class="rem">//Replace Special-Characters</span>
<span class="kwrd">for</span> (<span class="kwrd">int</span> i = 0; i &lt; chars.Length; i++)
{
<span class="kwrd">string</span> strChar = chars.GetValue(i).ToString();
<span class="kwrd">if</span> (strTitle.Contains(strChar))
{
strTitle = strTitle.Replace(strChar, <span class="kwrd">string</span>.Empty);
}
}
<span class="rem">//Replace all spaces with one &quot;-&quot; hyphen</span>
strTitle = strTitle.Replace(<span class="str">&quot; &quot;</span>, <span class="str">&quot;-&quot;</span>);
<span class="rem">//Replace multiple &quot;-&quot; hyphen with single &quot;-&quot; hyphen.</span>
strTitle = strTitle.Replace(<span class="str">&quot;--&quot;</span>, <span class="str">&quot;-&quot;</span>);
strTitle = strTitle.Replace(<span class="str">&quot;---&quot;</span>, <span class="str">&quot;-&quot;</span>);
strTitle = strTitle.Replace(<span class="str">&quot;----&quot;</span>, <span class="str">&quot;-&quot;</span>);
strTitle = strTitle.Replace(<span class="str">&quot;-----&quot;</span>, <span class="str">&quot;-&quot;</span>);
strTitle = strTitle.Replace(<span class="str">&quot;----&quot;</span>, <span class="str">&quot;-&quot;</span>);
strTitle = strTitle.Replace(<span class="str">&quot;---&quot;</span>, <span class="str">&quot;-&quot;</span>);
strTitle = strTitle.Replace(<span class="str">&quot;--&quot;</span>, <span class="str">&quot;-&quot;</span>);
<span class="rem">//Run the code again...</span>
<span class="rem">//Trim Start and End Spaces.</span>
strTitle = strTitle.Trim();
<span class="rem">//Trim &quot;-&quot; Hyphen</span>
strTitle = strTitle.Trim(<span class="str">&#39;-&#39;</span>);
<span class="preproc">#endregion</span>
<span class="rem">//Append ID at the end of SEO Friendly URL</span>
strTitle = <span class="str">&quot;~/Article/&quot;</span> + strTitle + <span class="str">&quot;-&quot;</span> + strId + <span class="str">&quot;.aspx&quot;</span>;
<span class="kwrd">return</span> strTitle;
}
</pre>
<p><strong>Step 5:</strong> Changing DataBinder.Eval Function in .Aspx Page to reflect changes in URL of Grid.<br />
Note: Learn more about <a href="http://dotnetguts.blogspot.com/2006/12/databindereval-method.html" target="_new">DataBinder.Eval Function</a></p>
<p><!-- code formatted by http://manoli.net/csharpformat/ --></p>
<pre class="csharpcode">
<span class="kwrd">&lt;%#GenerateURL(DataBinder.Eval(Container.DataItem,&quot;Title&quot;),DataBinder.Eval(Container.DataItem,&quot;Id&quot;))%&gt;</span>
<a href="http://urlrewriter.net/index.php/support/configuration" target="_blank"></a>
</pre>
<p>
Sources :
</p>
<ol>
<li><a href="http://dotnetguts.blogspot.com/2008/07/url-rewriting-with-urlrewriternet.html" target="_blank">http://dotnetguts.blogspot.com/2008/07/url-rewriting-with-urlrewriternet.html</a></li>
<li><a href="http://en.wikipedia.org/wiki/Regular_expression" target="_blank">http://en.wikipedia.org/wiki/Regular_expression</a></li>
<li><a href="http://urlrewriter.net/index.php/support/configuration" target="_blank">http://urlrewriter.net/index.php/support/configuration</a> 
	</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://yussi.nl/index.php/simple-url-rewriting-asp-net-with-urlrewriter-net.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP.NET Routing&#8230; how about URL rewriting?</title>
		<link>http://yussi.nl/index.php/asp-net-routing-how-about-url-rewriting.html</link>
		<comments>http://yussi.nl/index.php/asp-net-routing-how-about-url-rewriting.html#comments</comments>
		<pubDate>Tue, 06 Jan 2009 06:38:00 +0000</pubDate>
		<dc:creator>yussi ariefiyono</dc:creator>
				<category><![CDATA[asp.net]]></category>
		<category><![CDATA[url rewriting]]></category>

		<guid isPermaLink="false">/post/ASPNET-Routing-how-about-URL-rewriting.aspx</guid>
		<description><![CDATA[
i have been read couple of new articles about url rewriting and new method for it.
and cross this article, it gives me alot info about it. it really worth to try 


URL


these are pics to show what the diffrent of them:


ASP.NET Routing


&#160;





ASP.NET URL rewriting




source:4guysfromrolla, msdn 
]]></description>
			<content:encoded><![CDATA[<p>
i have been read couple of new articles about url rewriting and new method for it.<br />
and cross this article, it gives me alot info about it. it really worth to try <img src="/admin/tiny_mce/plugins/emotions/images/smiley-smile.gif" border="0" alt="Smile" title="Smile" />
</p>
<p>
<a href="http://chriscavanagh.wordpress.com/2008/03/11/aspnet-routing-goodbye-url-rewriting/" target="_blank">URL</a>
</p>
<p>
these are pics to show what the diffrent of them:
</p>
<p>
<strong>ASP.NET Routing</strong>
</p>
<p>
&nbsp;
</p>
<p>
<img src="/image.axd?picture=image_2.png" alt="ASP.NET ROUTING" title="ASP.NET ROUTING" />
</p>
<p>
<strong>ASP.NET URL rewriting<br />
</strong><br />
<img src="/image.axd?picture=urlmappingwf.gif" alt="ASP.NET URL REWRITING" title="ASP.NET URL REWRITING" />
</p>
<p>
source:<a href="http://aspnet.4guysfromrolla.com/articles/011007-1.aspx" target="_blank">4guysfromrolla</a>, <a href="http://msdn.microsoft.com/en-us/default.aspx" target="_blank">msdn </a></p>
]]></content:encoded>
			<wfw:commentRss>http://yussi.nl/index.php/asp-net-routing-how-about-url-rewriting.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
