Advertisement
Guest User

Untitled

a guest
Sep 26th, 2012
1,080
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. <?php
  2. ! defined( 'ABSPATH' ) and exit;
  3. /* Plugin Name: Redirect Main Site To Sub-Site */
  4. function wpse66115_redirect_to_sub_site()
  5. {
  6. if ( 'main-site' === $GLOBALS['wp']->request )
  7. exit( wp_redirect( 'http://www.example.com/main-site/sub-site/', 301 ) );
  8. }
  9. add_action( 'parse_request', 'wpse66115_redirect_to_sub_site' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement