Redirect wordpress users to a specific url using a 301 redirection

December 12, 2008 · Print This Article

Do you know that WordPress have a built-in function to redirect users to a specific url? It is called wp_redirect(). Many users don’t know it, but you can also create 301 redirections with that useful function.

To create a 301 redirection within WordPress, you just have to add the 301 argument to the function:

<?php wp_redirect('http://www.livexp.net', 301); ?>

The above code will redirect anyone on this site. Don’t hesitate to use it.


Related articles:

Your choice for site templates and wordpress themes

Comments

Got something to say?

You must be logged in to post a comment.