Understanding Redirects

Q1. I’m inclined to not trust this message on this site and think it’s nothing to worry about. It states clearly below that the certificate covers mail.yoursite, www.yoursite and yoursite. I couldn’t reproduce this error trying a couple of other ssl checker services such as https://www.sslshopper.com/. It’s also notable that in the little mouseover ? … Read more

Redirect to /404/

So you can do something like this: Open the 404.php file and add these lines to the top of it. If you don’t have one, create it. This will ensure WordPress uses this file for all permalinks that no longer exist or never existed. <?php /** * Template Name: 404 Page */ $four_oh_four = get_permalink( … Read more

WP Redirect with Wild Card Characters

You could make a regex if you do not use query variables from WordPress. Here is an example: function loggedout_user_redirect(){ if ( ! is_user_logged_in() ) { $regex = ‘~/users/(.*)~’; $url = $_SERVER[‘REQUEST_URI’]; preg_match( $regex, $url, $matches ); if ( isset( $matches[1] ) && ” !== trim( $matches[1] ) ) { wp_redirect( site_url( ‘/login’ ) ); … Read more