Support » Fixing WordPress » 301 Redirect for new permalink structure

  • Resolved Ryann Micua

    (@pogidude)


    Hi,

    I’d like help on putting in a 301 redirect into my htaccess file. My old permalink structure was:

    http;//www.example.com/blog/post-name

    I’d like it to be

    http://www.example.com/post-name

    What do I put in my .htaccess file?

    Thank you so much for taking the time to help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    Pretty simple 🙂

    RewriteRule ^blog/(.*)$ http://example.com/$1 [L,R=301]

    This says ‘ANYTHING that starts with blog/ gets punted back to just /’

    Put that ABOVE the ‘BEGIN WORDPRESS’ comment in your .htaccess 🙂

    Ryann Micua

    (@pogidude)

    sweet!! thanks so much!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘301 Redirect for new permalink structure’ is closed to new replies.