Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ! defined( 'ABSPATH' ) and exit;
- /* Plugin Name: Redirect Main Site To Sub-Site */
- function wpse66115_redirect_to_sub_site()
- {
- if ( 'main-site' === $GLOBALS['wp']->request )
- exit( wp_redirect( 'http://www.example.com/main-site/sub-site/', 301 ) );
- }
- add_action( 'parse_request', 'wpse66115_redirect_to_sub_site' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement