Community Forums › Forums › Archived Forums › General Discussion › Removing Category from Permalink
Tagged: categories, permalinks, redirect
- This topic has 4 replies, 2 voices, and was last updated 11 years, 1 month ago by Elizabeth Crane.
-
AuthorPosts
-
February 20, 2013 at 9:20 am #21658Elizabeth CraneMember
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!
Eliz
February 20, 2013 at 1:24 pm #21746Bill MurrayMember1) 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: https://wpperform.com or Twitter: @wpperform
We do managed WordPress hosting.
February 20, 2013 at 7:15 pm #21845Elizabeth CraneMemberThanks 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! 🙂
Eliz
February 20, 2013 at 10:37 pm #21868Bill MurrayMemberBut...
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: https://wpperform.com or Twitter: @wpperform
We do managed WordPress hosting.
February 20, 2013 at 10:51 pm #21874Elizabeth CraneMemberBill, 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.
Eliz
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.