Hello, Currently I am using Permalink Custom Structure i.e. /%category%/%postname%.html Code (markup): Now I want to remove .html from it so I did like this /%category%/%postname%/ Code (markup): but the posts send to 404 page and I want to 301 redirect from old structure to new one. I tried few plugins to redirect but nothing works. Does anyone have the solution or suggestion?
Changing code to /%category%/%postname%/ only change the permalinks for new posts and not for existing ones. Tery below htacess rule: <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /html/(.*).html\ HTTP/ RewriteRule .* http://localhost/html/%1 [R=301,L] RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /html/(.*)\ HTTP/ RewriteRule .* %1.html [L] </IfModule>
The problem is not to change the permalinks for new posts and not for existing ones. I am able to change the permalinks for both new and old posts but not able to 301 redirect old posts to the new format i.e. http://www.mysite.com/post.html to http://www.mysite.com/post/
I'm not sure you'll be able to do that. You may have to bite the bullet and 301 redirect all your old .html posts to their new permalink structure.
Nothing is impossible dude. There should be a way to do that, I'm sure I'll find out the solution anyhow.
You're right I'm sorry. Please update us. I'm interested in your solution. The jump is complex though because the permalink system of Wordpress isn't designed to offer more than one option on old versus new post. Maybe you could permantly cache what's there and then change the permalink structure, or literally generate those html pages if there is a plugin that does it and then you can change the entire site's permalink system... but still parts of your in-page linking system will point to the new permalinks while old posts retain the old link structure in it's internal html links. Which might cause duplicate content issues. Just sayin this one is super trixy. Still, good luck. There probably is a better way.