WordPress:Function Reference/wp redirect
来自站长百科
Description
Redirects the user to a specified absolute URI.
Parameters
Usage
%%% <?php wp_redirect($location, $status); ?> %%%
Example
<?php wp_redirect(get_option('siteurl') . '/wp-login.php'); ?>
Redirects can also be external, and/or use a "Moved Permanently" code :
<?php wp_redirect('http://www.example.com', 301); ?>