• Resolved Robert

    (@rsterry48)


    I have create two redirects to the same URL. One works correctly; the other directs back to the source URL.

    You can’t view these links as access is restricted.

    But I have successfully redirected
    /Register.pdf?
    to
    ?/wp/wp-content/uploads/wpmembers/guild_documents/Register.pdf

    However, when I try and redirect from:
    /wp/wp-content/uploads/wpmembers/Register.pdf
    to
    /wp/wp-content/uploads/wpmembers/guild_documents/Register.pdf

    it keeps redirecting back to the source URL i.e. /wp/wp-content/uploads/wpmembers/Register.pdf

    I’ve tried changing settings but doesn’t make any difference.

    Any ideas why?

    Many thanks
    Robert

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author John Godley

    (@johnny5)

    Check your cache and other redirects (in Redirection and outside of Redirection)

    Redirection will only do what you configure it to do, and any other behaviour is likely to be caused by something else.

    Thread Starter Robert

    (@rsterry48)

    Thanks for your reply John. I have cleared my own browser but doesn’t make any difference. But perhaps there’s a WordPress cache that also needs clearing? Perhaps also a web hosting cache? I’ve also checked the .htaccess but nothing there that I can see that would cause this problem.

    And I’m puzzled why this one works fine:
    /Register.pdf
    to
    /wp/wp-content/uploads/wpmembers/guild_documents/Register.pdf

    but this one redirects back to the source page:
    /wp/wp-content/uploads/wpmembers/Register.pdf
    to
    /wp/wp-content/uploads/wpmembers/guild_documents/Register.pdf

    Plugin Author John Godley

    (@johnny5)

    Without having access to the URLs I can’t really say any more, but as I mentioned above, if you haven’t configured it in Redirection then something else will be performing the redirect. You will need to look at your other plugins to see what might be doing this.

    Thread Starter Robert

    (@rsterry48)

    I’ve taken your advice John and looked at other plugins that might be causing this Redirection problem. The links are in a restricted folder controlled by a plugin called Prevent Direct Access. So the first redirection that works is from a link outside the restricted folder to a link inside. But in the case of the second redirection that doesn’t work, both links are in the same restricted folder. The PDA plugin requires some additional code in the .htaccess file as follows. Could this be causing the problem?
    # Prevent Direct Access Rewrite Rules
    RewriteRule ^private/([a-zA-Z0-9-_.]+)$ index.php?pda_v3_pf=$1&pdav3_rexypo=ymerexy [L]
    RewriteRule ^wp/wp-content/uploads(/_pda/.*\.\w+)$ index.php?pda_v3_pf=$1 [QSA,L]
    # Prevent Direct Access Rewrite Rules End

    # IP Block Rewrite Rules for Folder Protection
    RewriteRule ^wp/wp-content/uploads(/(wpcommittee|wpmembers|wpindexes|wpsemsub|wpprodman|wpsales|wpregistrar|wpvote|wpwebteam|wpmat)/.*\.\w+)$ index.php?pda_v3_pf=$1 [QSA,L,B]
    # IP Block Rewrite Rules for Folder Protection End`

    Plugin Author John Godley

    (@johnny5)

    I can’t really say whether something else is causing a problem. The best thing in these situations is to switch things off until you can identify the cause.

    Thread Starter Robert

    (@rsterry48)

    Thanks John for getting back. Your advice is appreciated.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Redirects back to source’ is closed to new replies.