I’am not absolutely sure what you mean but probably something like this may help you:
if( $_SERVER[ 'SERVER_NAME' ] == 'website1.com' ):
header( 'Location: https://www.example.com/w1' ); exit;
elseif( $_SERVER[ 'SERVER_NAME' ] == 'website2.com' ):
header( 'Location: https://www.example.com/w2' ); exit;
endif;
Related Posts:
- Customize default settings on new sites on multisite
- How to call plugin function per site in a multisite?
- Moving code from theme header to functions.php
- wp_redirect only works on main site and not on other sites
- List all blogs, but exclude the main site
- Is it legal to redefine wp_password_change_notification in a mu plugin?
- How to Redirect Buddypress Directories To Login Page For Non Logged in Users
- bp-custom.php is not working on a WordPress multisite environment. how to fix it?
- Remove node from multisites?
- use system script advertising in wordpress multisite
- I need a button to appear when not loged in and another when logged in, I need help fixing code PLEASE!
- add_rewrite_rule image from /images/site2/favicon.ico to /favico.ico
- How to Add Image to WordPress RSS-Feed with no Plug-in?
- WordPress Infinite Scroll without using any plugin
- How to remove a metabox from menu editor page?
- Enqueue Javascript Correctly for 3.5
- How to add active class to custom menu using while loop and wp_list_pages
- Cleanest/Fastest way to avoid calling and retrieving data from the database multiple times?
- Add footer.php to WordPress child theme
- WooCommerce – Display variation custom field value [closed]
- Restrict WordPress File Type Uploads by User Type
- New Plugin Review
- Problems with function on function.php
- Woocommerce HTML email option unavailable
- Use template for posts with a particular category grandparent
- How to slow down server response
- Click loads template via ajax
- Randomise upload filenames (or another solution to hide the original image URL from theft?)
- jQuery not defined
- Use menu link or onClick to set a variable
- Automatically remove a canceled order in Woocommerce
- WordPress add post format support not working
- Pass Category Name, Description and Photo into variables to pass to jQuery
- I want to load in a new class but only if the current page is single-movies.php
- Create highly customized submenu (possibly using wp_list_pages)
- Skt full width basic slideshow problem
- $wpdb->wp_users returning empty value for
- WordPress Custom field Colors
- php syntax : [ && ] between commands [closed]
- Which PHP page is the Default Posts Page
- Need to put a script above tag in header.php – WP 5.7.1
- Sending a custom form data in email through WP Mail Function
- How to call multiple functions from multiple files into a WordPress page template [closed]
- Isotope Drop Down Categories Filter Function
- How to use array in function to get only value I want
- What is the best way to define constant options for a theme?
- How to add PHP code in functions.php wordpress
- add_filter function concatenate string and locate_template function
- How to return a string that has a jQuery and Ajax inside in a shortcode?
- get_page_templates only return templates with “home” in the filename
- Class property seems to lose scope, attached to save_post action?
- Nav-Menu not showing up
- Show different website layout if no sidebar added
- get_template_part function and add images
- Need advice on theme customizer and child themes
- How to make sure relative URL works when site is not on root domain?
- How to pass hook variable to function?
- Migrating site, only header shows
- Change Language Title Pagination on Subdomain non Multisite
- remove specificly the last tag in all posts
- Let current user know pending posts counts using wp_query
- How to check post meta isset or not empty during publish/save post?
- how to changes mobile menu toggle breakpoint in WordPress
- Get page permalink in contact form
- How to display already created menus via php?
- Grabbing Image name From Product Image Gallery
- How to use Page link field with is_page()
- How to hide a child category and show his parent category
- Gutenberg block don’t save rich text content
- remove_action from parent theme using child theme functions.php
- Cant get blog name with get_option
- How to change this ajax function to submit to the default wordpress content area instead of the custom field ‘seller notes’?
- Remove span tags from WooCommerce Downloads page
- Extra editor on top of default in Custom Post Type
- How to add typehints to function in functions.php when argument is an object?
- Pagination 404 error(I have refreshed the permalinks and tried several previous options)
- How Can I Display the Last Modified Date for User Profiles on WordPress?
- Multiple WordPress sites with different theme and plugin sharing the same content
- is_user_logged_in() not working in homepage
- Custom Post type Ajax search results
- Customizing the output of the archive and category widget without altering the original behavior of the widget
- How can I export data without using any import/export plugin
- Search for images that width and height is more than 500
- Add disclaimer before certain posts and pages
- auto metakey value on post tile
- How do I routinely extract the thumbnail of the most recent post?
- wordpress ajax return 0
- My customizer’s setting doesn’t set to the default and needed to click the control’s “Default” button before it’ll be set
- site_url() returns with additional backslashes
- Overwriting a Shortcode
- Search box background on a different page template
- WP Ecommerce: Display the “Order Notes” as column in the Sales Log [closed]
- WP multisite network plugin fails to see classes loaded with spl autoload
- A next page function with shortcode?
- What is the wrong with this function to enqueue the scripts and styles to the theme? [closed]
- Warning: Attempt to read property “term_id” on int – Woocommerce
- Understanding responsive imagery
- How to get meta box labels?
- Background Tasks in a WP Cronjob?
- Tags being Inserted in html from plugin PHP not passing through the_content