Category links

Apr 19, 2012 at 1:10 AM

Hello,

I recently found that the individual category links stop working if I remove "/POST/" from 'UrlRewrite.cs'.

Here:

if(url.Contains("/FILES/") && url.Contains(".AXDX"))
                RewriteFilePath(context, url);
            if (url.Contains("/IMAGES/") && url.Contains(".JPGX"))
                RewriteImagePath(context, url);
            if (urlContainsFileExtension && url.Contains("/POST/")) {
                RewritePost(context, url);
            }
            else if (urlContainsFileExtension && url.Contains("/CATEGORY/")) {
                RewriteCategory(context, url);
            }
            else if (urlContainsFileExtension && url.Contains("/TAG/")) {
                RewriteTag(context, url);
            }
            else if (urlContainsFileExtension && url.Contains("/PAGE/")) {
                RewritePage(context, url);
            }
            else if (urlContainsFileExtension && url.Contains("/CALENDAR/")) {
                context.RewritePath(string.Format("{0}default.aspx?calendar=show", Utils.ApplicationRelativeWebRoot), false);
            }
            else if (urlContainsFileExtension && DefaultPageRequested(context))
            {
                RewriteDefault(context);
            }
            else if (urlContainsFileExtension && url.Contains("/AUTHOR/")) {
                var author = ExtractTitle(context, url);
                context.RewritePath(
                    string.Format("{0}default{1}?name={2}{3}", Utils.ApplicationRelativeWebRoot, BlogConfig.FileExtension, author, GetQueryString(context)),
                    false);
            }
            else if (urlContainsFileExtension && path.Contains("/BLOG.ASPX")) {
                context.RewritePath(string.Format("{0}default.aspx?blog=true{1}", Utils.ApplicationRelativeWebRoot, GetQueryString(context)));
            }
            else {

The segment in bold is what I removed.

 

I wish to retain the default category link (unchanged) - and only change the post link.