1

I'm using the Wordpress Redirection plugin to redirect from the homepage to another page on the site.

/ redirects to example.com/project-management-online-short-course/

However, when I type a URL like example.com/?s=randomstring it doesn't redirect.

I have tried several regex string none seem to work. Is it possible to catch these query strings?

3 Answers 3

1

You can Checkout with this query hope this help for you.

      <?php /*  
       Template Name: Your Custom page redirect
           */ 

      header('Location: http://example.com/project-management-online-short-course/');
      exit();

       ?>

if this is not working you can checkout with this link:- https://wordpress.org/plugins/redirection

Sign up to request clarification or add additional context in comments.

Comments

0

Put below code in you functions.php of active theme.

function check_user_on()
{
    if (!is_admin() && !is_login_page())
    {

        //flag false redirecting user to live site
        wp_redirect('https://example.com/location-new');
        exit; 

    }

}
add_action('init','check_user_on');

Comments

0

I have the same issue before 15 days ago when I type https://example.com then redirect to https://example.com/?xtfw_notice=6f0a7ee281 here: "?xtfw_notice=6f0a7ee281" this is a random tax. but I have debugged my site, resolved the issue after disable or remove plugin like: XT WooCommerce Floating Cart and after that my site working fine. So I have suggested please check the plugin. thanks.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.