Removing Category from Permalink

Community Forums Forums General Discussion Removing Category from Permalink

This topic is: not resolved

This topic contains 4 replies, has 2 voices, and was last updated by  Elizabeth Crane 1 year, 1 month ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #21658

    Elizabeth Crane
    Participant
    Post count: 16

    One of my websites has the permalinks set up like this /%category%/%postname%/ . I want to remove the category part. I know the removing is simple and I can do that in the permalink settings and just change it to the Post Name option. After that will I need to do 301 redirects for all my posts? I have around 150 posts. Is there an easy way to accomplish this? I have the Redirection plugin installed.

    Site is: http://lvpressclub.com

    Thank you!


    #21746

    Bill Murray
    Participant
    Post count: 572

    1) Give it a try, but be able to check the response code that is returned when you try to visit a URL with category in it. WP has re-write logic to account for changed permalinks. You can check the response code in Firebug, but there are many other ways. If the URL redirects but you don’t get a 301 status returned, you will then have to resort to using Redirection.

    2) If using Redirection, it’s less work than it might appear, because of RegEx (regular expressions). You should be able to create 1 rewrite rule using RegEx that will cover all 150 posts. You shouldn’t have to generate 150 rewrite rules.

    3) If you have to resort to Redirection, be sure to check several URLs to confirm your RegEx code is working and that the rewrites return a 301 status.


    Web: http://wpperform.com or Twitter: @wpperform

    We do managed WordPress hosting.

    #21845

    Elizabeth Crane
    Participant
    Post count: 16

    Thanks Bill. I did the permalink change and it worked fine and automatically redirected through WP. I then used the “Generate Redirects” tool here. http://yoast.com/change-wordpress-permalink-structure/

    All seems OK and my site is still up! :)


    #21868

    Bill Murray
    Participant
    Post count: 572

    But…

    Let’s say this was one of the URLs you were redirecting:

    http://lvpressclub.com/business/exhibitor-2013-trade-show-marketers/

    to:

    http://lvpressclub.com/exhibitor-2013-trade-show-marketers/

    The problem is that this is returning an HTTP status of 200, not 301 (hence the term “301 redirect”). Yes, the URL is redirecting, but without the 301 status, search engines won’t know that the old URL is now the new URL. So you’ll have a duplicate content issue. You commented that you used Yoast’s tool, and if you’re on an Apache server, doing a redirect through .htaccess (which is what his tool does) is fine, and faster than using the Redirection plugin. His tool should generate the .htaccess for a 301 redirect, but based on my quick check on that URL, I’m not seeing a 301.


    Web: http://wpperform.com or Twitter: @wpperform

    We do managed WordPress hosting.

    #21874

    Elizabeth Crane
    Participant
    Post count: 16

    Bill, thanks so much for checking on that for me. I’m going to work on this more tomorrow. I may just use the Redirection plugin and see how that works. I really appreciate your help with this.


Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.