Basically I created a mu-plugin in wp-content/mu-plugins. Here is a modified version of what I did to go to a custom file:
<?php
/*
Plugin Name: Multisite - Sign-up Page
Version: 1.0
Author: Shawn
*/
/*
* Redirect to correct domain signup (init runs after WordPress has finished loading but before any headers are sent)
*/
function multisite_signup(){
if($_SERVER['REQUEST_URI'] == '/wp-signup.php'){
do_action('signup_header', $_SERVER['HTTP_HOST'].'/my_custom_file.php');
}
}
add_action('init', 'multisite_signup');
/*
* In multisite this runs when the "main domain" signup.php is accessed OR a domain is not found
*/
function signup_redirect($url="#some_default#"){
wp_redirect($url);
exit;
}
add_action('signup_header', 'signup_redirect');
Related Posts:
- Redirect to checkout woocommerce failed
- Building a request processor for multi-page forms, etc using $_GET requests
- Filter wp_redirect() to stop redirect under certain condition
- auth_redirect() doesn’t send users to the page where they orginally tried to acces
- Redirect an archive page to its relevant URL-friendly filtered page
- How to redirect a unique link based on login status
- Add custom options to the wplink dialog
- Sanitize and data validation with apply_filters() function
- How many filter/action hooks are healthy?
- Filter specific shortcode output?
- Insert new element to array with add_filter
- Valid characters for actions, hooks and filters
- How to hook into unregistering a widget instance?
- How can I extend the Gutenberg table block transform to allow colspans/rowspans on pasted table elements?
- How do I use the ‘http_request_host_is_external’ filter
- get_option() filtering and getting out of recursion
- Get excerpt from $post->post_content
- How can I add information underneath the user’s name on the users.php page?
- Is calling function_exists() faster or slower that apply_filters()
- Filtered query_vars becomes global. Why does this work?
- AJAX filter posts on click based on category
- How can I filter Microsoft Word gunk from pasted content?
- How to disable all WordPress emails modularly and programatically?
- How do I know if author field was changed on post save?
- Allow Profile HTML for select users
- Alter only the page title, not the post titles within
- WordPress 3.5+ upload tool filter
- Search with filters and title
- Some questions regarding filter
- Use content custom filter for all shortcodes
- Filter all html output
- Which hook is fired when inserting media into a post
- How to specify which category of the post to use in case of multiple categories
- Return array of images after content
- failed to filter hook `get_terms_defaults`
- Filter list by a unique meta value dilemma
- How to use shortcode attribute in separate function
- return values from hooks do_action and apply_filters, which is better
- Is it possible to track down Actions and Filters?
- get_title without filter(the_title)
- How can filters be run when they are never applied?
- How to filter a wordpress core function?
- Adding id and class to the search input in WordPress search form
- get_bookmarks filter not supplying query argument (wp 3.1)
- Filter Posts by current Month
- Is there a filter called ‘network_admin_init’?
- Manipulating show_on_front, page_on_front, page_for_posts and template hierarchy
- Are there actions or filters I can use for Ajax calls?
- Post Content, Special Characters and Filters
- Correct method of redirecting user login
- How to filter for user registration, be able to throw error message
- No ‘Access-Control-Allow-Origin’ header is present [closed]
- Admin filter for product SKU?
- Contact Form 7: Make field required after checkbox is checked
- Customize title, description and focused keyword [closed]
- Filtering the post list in the admin area
- Filter pre_get_posts does not modify Mine/All/Pending
- wp_mail works with add_action(‘save_post’, …) but not an ajax action
- How to check if a protected hook is hooked?
- Can i use multiple ‘the_content’ filters?
- Is it possible to put the add-filter()-hook into a function?
- How can I return shortcode output to the top of the content?
- Filter for when the post is updated
- Translate custom order status through a filter?
- Using preg_replace() with the_content filter
- term_link filter gives less atributes
- Filter a pluggable function
- Add mime types with plugin
- Filter media upload attachment meta
- Filter have_posts()/ the_post()
- How to add filter in custom rss feed
- WP 4.5 hide core customizer sections
- Echo string in admin panel footer beside version no
- How to change default text for specific post type
- Add PHP code after title in single post pages?
- Custom nav walker: How to acces the $args parameter?
- How to stop the deduction in “wp_term_taxonomy” count, when the post is deleted?
- How To Get Search Term and Use in Function
- Same URL for portfolio and for a page creates 404 error. Is there any filter that i can use for a child page?
- How to pass a variable between filter/action functions?
- Filter the title to only affect the_title() template function
- how to unescape wordpress output
- How can I limit access to uploaded media depending on the logged in user’s user role?
- Database & Post Search
- login_url filter creates permanent wp-admin -> wp-login redirection loop
- How can I filter same content in page
- How can I change the button text of a custom widget?
- the_content filter not working when Jetpack activated. Any idea?
- Adding Filter | Page Title | Template | Why the_title affecting on menu?
- gettext filter does nothing
- Restrict access to custom post type and filter from every query
- Why none of xmlrpc filters work
- How to use the filter ‘widget_text’ to a particular text widget with id
- Custom xmlrpc request does not pass parameters?
- Hook into ‘when user logs in’ [persistent login]
- Filter on widget-title does not work with custom links
- can’t output gray scaled image I’ve created using add_image_size
- How properly write function to filter content in a template for plugin “multiple content blocks”
- ACF Load Field Groups Programmatically [closed]
- Why does using excerpt_more filter change link location?