GEN Magazine Gating

Is now done through a regular expression in WP admin > Tools > Redirection.

First redirect:

Redirection ‹ GEN - Genetic Engineering and Biotechnology News — WordPress - Google Chrome
Source url: 
^(\/category\/magazine\/[0-9]{3}\/?)

Logged out url: /get-the-gen-digital-magazine?r=$1
Click to copy

Second redirect:

 

Redirection ‹ GEN - Genetic Engineering and Biotechnology News — WordPress - Google Chrome
Source url: 
^((\/category)?\/magazine\/[a-zA-Z]+[-]{1}20[0-9]{2}[-]{1}vol[-]{1}[0-9]{1,2}[-]{1}no[-]{1}[0-9]{1,2}\/?)

Logged out url: /get-the-gen-digital-magazine?r=$1
Click to copy

Behavior:

When someone tries to go /magazine (basically any magazine issue on GEN) the system:

  • checks to see if they are logged in
  • if the visitor is logged in, they go to the page they were trying to view
  • if the visitor is not logged in, they go to a form to fill out which will create an account for them. There is a link on the form to login if someone already has an account.