Last active
December 19, 2015 00:48
-
-
Save thamas/5870795 to your computer and use it in GitHub Desktop.
Drupal 7, Rules export. Use to redirect anonymous user to frontpage when she tries to access content using node/[nid] path. So content will be available only on its path alias.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ "rules_access_w_alias_only" : { | |
"LABEL" : "Acces content with alias only", | |
"PLUGIN" : "reaction rule", | |
"TAGS" : [ "access" ], | |
"REQUIRES" : [ "rules" ], | |
"ON" : [ "node_view" ], | |
"IF" : [ | |
{ "user_has_role" : { | |
"account" : [ "site:current-user" ], | |
"roles" : { "value" : { "1" : "1" } } | |
} | |
}, | |
{ "AND" : [] }, | |
{ "text_matches" : { "text" : [ "site:current-page:url" ], "match" : "node" } } | |
], | |
"DO" : [ { "redirect" : { "url" : "[site:url]" } } ] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment