What I'm looking to do is actually a simple redirect, but for the EVERY page contained in the /author/ slug. The working slug I want to redirect to is /team/.

For example, if someone were to type in: 'www.mysite.com/author/jack-sparrow', it would automatically redirect them to 'www.mysite.com/team/jack-sparrow' (the 'team' page being a page I designed with the layout editor).

I can input these redirects manually, I'm sure, but there has to be some simple succinct bit of code unbeknownst to a noobie like me that automatically redirects ALL the author template pages and tells the site to "redirect ALL /author/[firstname-lastname] to /team/[firstname-lastname]"

I would be sincerely grateful for your help!

  • you could just change the author base to team and remove the need to redirect. – Milo Apr 13 '15 at 17:00
  • how would this be done? do i have to change something in the php? sorry... i'm really new with this! – user70554 Apr 14 '15 at 6:33
  • the simplest method is via a plugin. – Milo Apr 14 '15 at 16:16
  • thank you very much for that, milo. from what i gather, though, this will merely MOVE the author template and not allow me to replace it was a custom page. so, if i changed the slug to 'team' for example, clicking a gravatar picture or something would merely load the author.php file into /team/~ instead of /author/~. – user70554 Apr 15 '15 at 2:44

You do this with URL Rewriting. Locate your .htaccess file and add this line above # BEGIN WordPress

RewriteEngine On
RewriteRule ^author/(.*)$ /team/$1 [R=301,NC,L]

Note, if you put this inside the wordpress block it will get rewritten next time your permalinks are regenerated.

  • so does this mean that the /author/ template will not merely be redirected but just completely written over/erased? by eliminating this code later, will it return to the original (for future purposes, if I wanted those pages back)? – user70554 Apr 14 '15 at 6:35
  • Correct on both points. – TheGentleman Apr 14 '15 at 11:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy