Permalink Structure

Discussion in 'ASP .Net' started by Will Chamberlain, Jan 20, 2006.

  1. I have been creating a personal blog engine for the last couple of weeks
    because I am tired of using WordPress and I don't have a SQL server
    back-end. I have successfully created a working URL rewriting engine
    (via Global.asax) that cleans illegal characters from the post title,
    uses Regular Expressions to grab the entryID (ie 13), rewrite the path
    (entry.aspx?entryID=13).

    My current permalink structure is as follows:

    root/blog/testing-post-example-00013.aspx

    I have noticed that some blog engines have the following schemas for
    their permalink structures:

    root/blog/testing-post-example/00013.aspx

    I have tried to create this structure programmatically with the
    following code:

    string EntryTitle = "testing-post-example";
    string PermaLink = EntryTitle + "/" + "000" + EntryID + ".aspx";

    When I try to run this I get the error that the file can't be found,
    obviously. There must be a way to create this link structure without
    having to physically create the directories. I can't imagine that all
    of these bloggers login and create a directory for each post and place a
    "showEntry.aspx" file in there.

    Any suggestions?

    - Will

    *** Sent via Developersdex http://www.developersdex.com ***
    Will Chamberlain, Jan 20, 2006
    #1
    1. Advertising

  2. Nevermind!

    Original RewritePath
    httpContext.RewritePath("entry.aspx?entryID=" + pageID);

    New RewritePath
    httpContext.RewritePath("/entry.aspx?entryID=" & pageID)

    No wonder it was FILE NOT FOUND (enry.aspx). Instead of looking in the
    root directory (actual location) for entry.aspx it was looking for
    entry.aspx in the dynamically created "directory" folder.

    *** Sent via Developersdex http://www.developersdex.com ***
    Will Chamberlain, Jan 20, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Excluded_Middle

    Pointers to structure and array of structure.

    Excluded_Middle, Oct 24, 2004, in forum: C Programming
    Replies:
    4
    Views:
    740
    Martin Ambuhl
    Oct 26, 2004
  2. Leo Nunez
    Replies:
    3
    Views:
    1,193
    Neil Kurzman
    Feb 9, 2005
  3. Replies:
    2
    Views:
    592
  4. Steve Madsen

    RSS::Maker and non-permalink guids

    Steve Madsen, Sep 11, 2009, in forum: Ruby
    Replies:
    1
    Views:
    205
    Kouhei Sutou
    Sep 12, 2009
  5. kj
    Replies:
    2
    Views:
    120
Loading...

Share This Page