Search code examples
content-management-systempermalinks

How to implement Wordpress-like Permalink


I was thinking about a building a CMS, and I want to implement the wordpress-like permalink for my posts. How do I do that?
I mean, How do I define the custom url structure for my pages?


Solution

  • What language are you using? I'm assuming that you are thinking about PHP (given your reference to word press). You have a few options:

    1. Mod-Rewrite
    2. Router

    In my opinion, the best option is to find a modern web framework that provides good routing functionality. Furthermore, look at modifying an existing CMS (many exist; you seem to have heard of word press).