Support » Fixing WordPress » Rewriting URLs using page slug

  • maerk

    (@maerk)


    I’m trying to rewrite URLs after a change in the structure of my website. I’m having problems rewriting using the page slug.

    I want to turn
    beingmrkenny.co.uk/posts/example-page-slug-here
    into
    beingmrkenny.co.uk/blog/index.php?name=example-page-slug-here

    When I enter the second URL it works perfectly, but when I try to set up a rewrite to do this, it fails.

    RewriteRule ^posts/([a-z-]+)/? /blog/index.php?name=$1

    Has anyone tried to do a similar thing? Or does anyone know if my rewrites are incompatible with WordPress (version 2.0.2).

  • The topic ‘Rewriting URLs using page slug’ is closed to new replies.