Viewing 3 replies - 1 through 3 (of 3 total)
  • Thank you for getting in touch.

    At first I was struggling to imagine what could be going wrong, but then realized that I probably need to just make it clear how (and when) the redirect feature is supposed to work…!

    If you login to WordPress directly by typing in the URL (e.g.) https://intranet.mycompany.com/wp-login.php, then (hopefully) you should find the login redirect works as you hoped.

    However, the redirect will be overridden if the login page only appears because a user tried to access a different intranet page (and needs to login to be allowed access).

    For example, if a logged-out user attempts to access https://intranet.mycompany.com/specialpage/ you will see they are sent to login via this URL:
    https://intranet.mycompany.com/wp-login.php?redirect_to=https://intranet.mycompany.com/specialpage/ (in reality the last part would be encoded slightly). The redirect_to component will override the Login Redirect of the plugin, and send the user to /specialpage/

    So I’m guessing you are trying to login by accessing the URL https://intranet.mycompany.com/ (for example), and then being redirected via the login page, back to https://intranet.mycompany.com/ which overrides the login redirect because you were trying to access a specific page.

    In summary, the login redirect only takes effect if a user logs in via https://intranet.mycompany.com/wp-login.php directly.

    So your ‘standard link’ to your intranet, e.g. in the email you send out to employees, should be to the login page at https://intranet.mycompany.com/wp-login.php.

    Obviously, this raises the question: why not just send out the URL of your intended redirect URL in the first place? That would work fine, but would be harder to change in the future.

    Also, there is plenty of scope to increase the functionality of the plugin in the future. Perhaps we could find a way to redirect to different pages based on username or WordPress role?

    Such enhancement suggestions would be gratefully received, and of course relies on feedback from users such as yourself. It would be great if you get a chance to describe in more detail what you are trying to achieve with your intranet, and why your login redirect page was chosen etc. Please email [email protected] if you have a moment to let me know.

    I hope this explanation helps – sorry for the long description! I’ll try to find a way to make the behavior clearer in a future release.

    Thanks,

    Dan

    stonehorse18

    (@stonehorse18)

    The re-direct works, but the page does not show properly(only TEXT ). I entered nothing in the redirect address. However, I cannot reverse the effect. Please advise how can I put in the redirect address ?

    danlester

    (@danlester)

    Thank you for your message.

    You say the redirected-to page doesn’t show what you were expecting, but does that same page ‘work’ if you go to it directly?

    If it seems to be a problem only when redirected, I think the best thing would be if you can send me a temporary admin username/password so I can take a look. I would also need more details on which URL you want to redirect to etc, and what you are seeing at the moment.

    You can email me on [email protected] – I look forward to hearing from you!

    Dan

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘redirect isn't working’ is closed to new replies.