WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. DanielTulp
    Member
    Posted 1 year 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.

    Cheers,
    Daniël Tulp

    http://wordpress.org/extend/plugins/404-redirected/

  2. DanielTulp
    Member
    Posted 1 year 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
    Member
    Posted 1 year 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
    Member
    Posted 1 year ago #

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

  5. Cliff Seal
    Member
    Posted 1 year ago #

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

  6. Carrie
    Member
    Posted 1 year 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
    Member
    Posted 1 year 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!
    -gw

  8. MikeySmithy
    Member
    Posted 1 year ago #

    Hi guys,

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

    Please check out this related topic:
    http://wordpress.org/support/topic/how-to-ignore-certain-url-parameters-pe-homeparametertest

    Does anyone have a solution?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic