Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have changed the /author/ slug to /profile/ by adding the following code in the file functions.php:

function new_author_base() {
global $wp_rewrite;
$author_slug = 'profile';
$wp_rewrite->author_base = $author_slug;
}
add_action('init', 'new_author_base');

Since Google is crawling my author pages now I need to redirect the old /author/ urls to the new /profile/ ones in the .htaccess...

Any ideas?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Add this to 'your' section of the .htaccess file (so not in the WordPress section):

Redirect 301 /author http://yourdomain.com/profile
share|improve this answer
    
Nice! Thank you. –  drabello Feb 25 '13 at 20:19
    
@drabello glad to be of help :-) –  Camil Staps Feb 25 '13 at 20:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.