1. Home
  2. Knowledge Base
  3. Document Library Pro
  4. Document Access Control

How to redirect users after logging into the document library

Document Library Pro redirects users as follows after they log into a protected library:

  • If they logged in via the document login page - They are redirected to the main document library page which lists all the documents that are visible to the current user.
  • If they clicked directly on a link to a protected document category or individual document - After logging in, they are redirected to the category/document that they were trying to access.

There are several ways to change this behavior if required, depending on the type of protection you are using:

Password protected document categories

How to redirect users after logging into a protected document category:

  1. Make sure users are logging in via the document library login page, instead of clicking on a direct link to the category they are trying to access.
  2. Add a 301 redirect from the protected category to wherever you want to redirect them after they unlock the category. (You can do this using a free WordPress plugin such as Redirection).

When someone enters the correct password on the central login page, Document Library Pro will redirect them to the individual category page. You can then redirect them to another URL, as needed.

User or role protection

If you have restricted documents to specific logged in users or roles, then what happens after people log into their accounts comes from WordPress itself rather than Document Library Pro. This means that you can use any login redirect plugin to choose what happens when people login.

We particularly recommend the LoginWP plugin. This lets you add fine-grained rules for login redirections. For example, you can set a URL for users to be redirected to depending on their user role or even their individual username. This is a good way to redirect people to their category after they login.

Related Articles

If searching the knowledge base hasn't answered your question, please contact support.