404 Redirected
[resolved] Exclude pages and url strings (8 posts)

  1. DanielTulp
    Posted 2 years ago #

    First off, thanks for the very useful plugin and the maintenance you do on it.
    I do have a question though, can I exclude certain pages and url strings from being processed by the plugin?
    Would be a great feature.
    Where to look in the code.

    Daniƫl Tulp


  2. DanielTulp
    Posted 2 years ago #

    In /wp-content/plugins/404-redirected/includes/frontend.php

    I added
    if($urlParts['path'] != '/search' && $urlParts['path'] != '/search/' ){

    in function wbz404_process404() before
    //Get URL data if it's already in our database on line 65

    this excludes the search page from being redirected

  3. Core Data Recovery
    Posted 2 years ago #

    That worked for me as well, I'd like to put in an exclusion list.

    Maybe they will add a feature to ignore certain things like /checkout/ or /checkout/pay

    It was interfering with my woocommerce cart with a plugin called paypal advanced.

  4. Core Data Recovery
    Posted 2 years ago #

    Don't forget to add the extra } at the end of the function area to close the if function.

  5. Cliff Seal
    Posted 2 years ago #

    This was just what I needed. Thanks so much for posting your solution!

  6. Carrie
    Posted 2 years ago #

    The plugin is great - but it's redirecting my UTM links, which is messing up my analytics. This was exactly what I was looking for.

    But... where do I close the if? I put the closing bracket at the end of the function and it APPEARS to be working. I just want to make sure I didn't miss something.

  7. funreviews.net
    Posted 2 years ago #

    I'm a little confused where this code goes, could someone post a snippet of this code inside where it's supposed to go, please?

    Also, I totally need this so THANK YOU for posting this- however, I need to exclude way more than one directory...how can I add other directories as well?

    Thanks again!

  8. MikeySmithy
    Posted 2 years ago #

    Hi guys,

    just ran into something similar (problem with using parameters).

    Please check out this related topic:

    Does anyone have a solution?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • 404 Redirected
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic