Not a theme problem...but need htaccess solution for duplicate posts
For some reason, I've quite a number of posts showing 2 urls in Google Webmaster tools. e.g:
/this_is_a_post/1447/ /this_is_a_post/ My permalink structure is /%postname%/%post_id%/ This is my current htaccess <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> Both types of urls resolve, but to avoid duplicate issues and keep all my links resolvable, I want to 301 redirect all url requests that include the post_id, and just return the postname in the url i.e. /this_is_a_post/ Searched the web but haven't found a htaccess rule that quite works. Appreciate any help. |
If "any" help is OK, and if "quite a number of posts" is manageable, my slowfix would be to use a Redirection plugin for the posts that appear twice.
|
All times are GMT -6. The time now is 03:57 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.