How to 301 redirect WP pages with a specific word in the URL
I've changed the URL structure of my WordPress pages (not posts) from: mysite.com/pages/something-xxxxx to: my开发者_StackOverflowsite.com/news/something-xxxxxx I'd like to 301 redirect the old structure /pages/ to the new one /news/ via .htaccess.
Thanks in advance
You may use mod_rewrite in your .htaccess:
RewriteEngine on
RewriteRule ^pages/(.*)$ http://yoursite.com/news/$1 [R=301,L]
精彩评论