Support » Plugin: Restrict Content by Role » Not Redirecting to Originally Requested URL after Login

  • Hello,

    I have installed your Restrict Content By Role plugin, however it is not redirecting as expected. My steps were:

    • Selected “Pages” for “Choose Public Post Types”
    • Checked the “Redirect to original page” checkbox
    • Entered a custom URL in the “Redirect URL” textbox
    • Created a page and set it to restrict “Public Access
    • Tested by browsing to the page.
    • It redirected as expected to my custom redirect URL. In the address, the “redirect_url” query var was correct.
    • Logged into the page expecting to be redirected to the original requested URL, but was redirected back to my custom redirect URL instead.
    • Navigated back to the restricted page and was logged in as expected, so it is just the redirect that is not working.
Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter cinderalla

    (@cinderalla)

    Any help you could provide would be greatly appreciated.

    Thank you!

    Same issue here
    The plugin is nice and works well but the redirect to originally requested page does not work.
    Please anyone with a solution should assist.
    Thank you

    Plugin Author Matt Watson

    (@mwtsn)

    Hi All,

    I’m looking into this, and should have a patch by Thursday. Thank you for your patience.

    Plugin Author Matt Watson

    (@mwtsn)

    Hi @cinderalla, this one was a real head scratcher. Unfortunately it seems that settings on your server can override caching, so because the page is cached, it thinks its a redirect, even on a second logged in visit.

    I will look into adding a cache buster setting in there.

    Plugin Author Matt Watson

    (@mwtsn)

    Cache buster setting will need to be an appended query string or something similar. Not great, but other then correctly setting server cache I don’t think there is another option.

    Thread Starter cinderalla

    (@cinderalla)

    Thanks so much for your time and looking into this! Greatly appreciate whatever you can do to help getting the redirects working!

    Thread Starter cinderalla

    (@cinderalla)

    Hello – I may have misunderstood your last response, but are your plans to update the plugin with a cache buster setting? If so, do you have a timeline by chance?

    Plugin Author Matt Watson

    (@mwtsn)

    Its on the list of things to do, but unfortunately no, there is no timeline currently.

    Its a case of fitting it in when capacity allows me to work on it.

    Hi,

    I’m experiencing the same issue.

    You said: Unfortunately it seems that settings on your server can override caching, so because the page is cached, it thinks its a redirect, even on a second logged in visit.

    Can we fix this on our end by changing settings on the web server or .htaccess file? Can you give us a hint as to what settings we need to review, please?

    Thank you.

    Regards,
    Rich

    Plugin Author Matt Watson

    (@mwtsn)

    Yes, by removing all but the standard WP config from .htaccess will resolve the issue.

    Hi Matt,

    I presume you mean the .htaccess file at the root of the site where index.php exists. In that case, I believe I have the default configuration:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    If there’s something there that should change, please let me know.

    Thank you.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Not Redirecting to Originally Requested URL after Login’ is closed to new replies.