nonno john
Member
Posted 1 year ago #
A handful of old posts were deleted...and now trying to have old posts permalinks redirect to new posts. I placed the .htaccess file (below) in my /blog directory , but the redirect does NOT work ...instead, the browser returns "not found" (from WordPress Coraline 404.php template) when looking for http://mydomain.org/blog/?p=1111 (old post)
# BEGIN WordPress
Redirect 301 ?p=1111 http://mydomain.org/blog/?p=2222
# END WordPress
I only have about 8 of these redirects to do ...any help would be appreciated.
hmm... you should use query_string rule
something like that:
RewriteCond %{QUERY_STRING} p=1111 [NC]
RewriteRule (.*) http://mydomain.org/blog/?p=2222 [R=301,L]
or use plugin like:
http://wordpress.org/extend/plugins/redirect/
http://wordpress.org/extend/plugins/quick-pagepost-redirect-plugin/
nonno john
Member
Posted 1 year ago #
@adpawl
worked like a charm ...can't thank you enough. here is the code placed in .htaccess file:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{QUERY_STRING} p=1111 [NC]
RewriteRule (.*) http://www.mydomain.org/blog/?p=2222 [R=301,L]
</IfModule>
# END WordPress
great!