WordPress.org

Forums

What permalink structure do you use? (15 posts)

  1. alberto
    Member
    Posted 10 years ago #

    Hi,
    I'm building a WP site and I have to choose a permalink structure. It's a very important choice since if you change idea later many external links to your site will be inevitably broken.

    My site is not a blog, I will use WP as a CMS, so I'm not very satisfied of the traditional permalink structure /%year%/%monthnum%/%day%/%postname%. I'm on Apache 1.3 (Dreamhost) so I can't use %category%.

    I've just read "Using Permalinks" in WP Codex:
    http://codex.wordpress.org/Using_Permalinks

    What permalink structure do you use?

    Regards
    Alberto

  2. James Huff
    Volunteer Moderator
    Posted 10 years ago #

    I use /archives/%year%/%monthnum%/%day%/%postname%/

    I would rather use /%year%/%monthnum%/%day%/%postname%/ , but the /archives/ was required at the time when I started using WordPress.

    Since the debut of WP v1.5.0, I have seen a variety of shorter permalinks. The most effective seems to be just /%postname%/ . In the v1.2.x era, this was highly discouraged as two posts of the same title could destroy your site. With v1.2.x, you needed that date structure to differentiate the posts. Now, with v1.5.x, WordPress will add a number to the post slug if there are more than one, for example: /happy-new-year/ and /happy-new-year-2/ . The date structure is no longer required.

  3. angsuman
    Member
    Posted 10 years ago #

  4. alberto
    Member
    Posted 10 years ago #

    A short permalink structure such as /%postname%/ would be ideal for my site, but:

    1) in WP Codex I've read "Note on using only %postname%: If you use postname as the only element in your permalinks to create a structure such as myblog.com/post-title, the rewrite rules may make it impossible to access pages such as your stylesheet (which has a similar format) or the wp-admin folder. It's best to include some numeric data (e.g. the post ID or date) in the permalink to prevent this from happening."
    Is this warning valid also for WP 1.5.1?

    2) is it a problem running this short permalink structure on Apache 1.3?

    Thanks in advance

  5. James Huff
    Volunteer Moderator
    Posted 10 years ago #

    1. Good point, I forgot about that one.

    2. No, there are no problem with that structure an Apache 1.3.

    In observation of #1, I'd use /%year%/%postname%/

  6. Michael Bishop

    Posted 10 years ago #

    As I read the codex as well, I adopted the following:
    /%year%/%category%/%postname%/
    adding cat just seemed logical

  7. alberto
    Member
    Posted 10 years ago #

    I'm currently testing WP 1.5.1 on apache 1.3.x with the shorter permalink structure /%postname%/

    I really don't understand the warning present in the Codex:

    "Note on using only %postname%: If you use postname as the only element in your permalinks to create a structure such as myblog.com/post-title, the rewrite rules may make it impossible to access pages such as your stylesheet (which has a similar format) or the wp-admin folder. It's best to include some numeric data (e.g. the post ID or date) in the permalink to prevent this from happening."

    My question is:
    In what circumstances "the rewrite rules may make it impossible to access pages such as your stylesheet (which has a similar format) or the wp-admin folder"?

    Many thanks

  8. alberto
    Member
    Posted 10 years ago #

    I'm currently testing WP 1.5.1 on apache 1.3.x with the permalink structure /%category%/%postname%/ and WP works fine.

    But in the WP Codex there is this warning:
    Note on using %category%: %category% does not work correctly with mod_rewrite in Apache versions prior to 2. If you are using Apache 1, do not use %category% in your permalink structure.

    At this point I have a doubt: is this page of the codex updated to 1.5.1 or it refer to older versions?

  9. angsuman
    Member
    Posted 10 years ago #

    @miklb
    What if your post belongs to multiple categories?

  10. Michael Bishop

    Posted 10 years ago #

    I guess under my organization, that wouldn't occur. In another site of mine, where there are multiple cats, it goes to the parent cat. However, it is a curious question, and one worth experimenting with, for the "just in case".

  11. rsanheim
    Member
    Posted 10 years ago #

    I'm a big fan of shorter permalinks, and plan on using the tips here to change to a /blog/%postname%/ structure.

  12. Alex Mills (Viper007Bond)
    Moderator
    Posted 10 years ago #

    I use /archives/%year%/%monthnum%/%day%/%postname%/ and have /archives/ redirect to my archives list.

    I had been using /%year%/%monthnum%/%day%/%postname%/, but I switched to using archives 'cause I thought it better explained what was going on. *shrug*

  13. holographic
    Member
    Posted 10 years ago #

    I use /year/month/day/postname/ for my weblog, and /year/postname/ for my photolog

    I might remove day from my blog permalinks at some point, because it seems unnecessary when I generally only post once a day anyway.

    My photolog doesn't display postdates, so I didn't want them in the url. The year is there partly to prevent any /postname/ weirdness (as mentioned above), and partly so that people can have some idea as to when the entry was posted.

  14. tqn69
    Member
    Posted 10 years ago #

    I'm happily using /year/month/postname/ on my blog. @holographic, I came to the same conclusion that /day/ was unnecessary. However, I like retain /year/ and /month/ in order to provide that level of date-context. Plus you can type in http://domain.com/blog/2005/08/ and get the archives for August, for example.

  15. IsaacSchlueter
    Member
    Posted 10 years ago #

    If you want to use %category% in your permalinks with Apache 1.3, check out http://isaacschlueter.com/plugins/i-made/lucky-13-rewrite/

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags