• Hi everyone,

    Got a question about the use of permalinks. I was looking over the relevant page in the codex and it says it’s best to start with a numeric field and end with postname.

    I was wondering if it was possible to use http://www.site.com/postname, where postname is actually only numbers, in this case the date. Is it the numeric field itself that is important or would only numbers in the postname field itself suffice?

    I am currently using http://www.site.com/year/postname, but would love to get rid of the year. On a side note, I tried this already and it cut off my ability to display comments, so there might not be much I can do about it anyway.

    Thanks in advance,
    Richard

Viewing 11 replies - 1 through 11 (of 11 total)
  • Why not use /%post_id%/%postname%/?

    Thread Starter keepingitril

    (@youthgas)

    I hadn’t tried that. Thanks for the idea.

    Would love to just have postname, but eh…

    Would love to just have postname, but eh…

    /%postname%/ will also work if thats what you want.

    If you are changing your url structure, watch out for 404 errors and set up redirects if necessary

    Gary, how do i fix that? Every time i change my permalinks to something else but default, I get 404 error. Anywhere I can read up on it? Thanks!

    Thread Starter keepingitril

    (@youthgas)

    Thanks Gary.

    I would like to, but the codex suggests there could be performance issues, but more so, using only postname doesn’t display the comments page.

    @youthgas: The performance issue with /%postname%/, according to the Codex: ” has been changed and is ok to do since ver. 2.0″. The comments problem seems a bit wierd.

    @shvidky: By 404 errors, I ment people coming from search engines might be sent to old urls, rather than the new structure. Your problem seems to be related to the .htaccess file in you root.

    Create a text file called .htaccess with the following code, and upload it to your root

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    http://codex.wordpress.org/Using_Permalinks#Where.27s_my_.htaccess_file.3F

    The performance issue with /%postname%/, according to the Codex: ” has been changed and is ok to do since ver. 2.0

    No – it hasn’t! In fact I checked into this again only recently. The potential performance issue still exists. I’ve now placed a strikethrough on that line of the relevant Codex page.

    Thread Starter keepingitril

    (@youthgas)

    Was going to try going back, but now won’t.

    @esmi: Cheers, for updating the Codex. Any links to more info on the subject?

    If you can cope with the tech-speak, there’s a good discussion on the subject in the wp_tester’s list archive. Look out for the posts by Otto. I spoke to him some weeks ago about this very subject and he confirmed that it’s still an issue – especially if you’re creating Pages as well as Posts.

    I do know that about 90% of the cases that I’ve seen where custom permalinks have been a problem, it’s been in situations where people have been using /%postname%/ or /%category%/%postname%/

    Thanks, I’ll take a look.

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Permalinks structure’ is closed to new replies.