This code redirects anyone how isn’t a logged in user to the absolute URL in the code.
In this case, all logged out users will be redirected to the the login page however this URL can be changed to any URL.
This code can be used to make your site into a membership site and require logged out users to register before being able to view your sites content.
Leave a Reply
You must be logged in to post a comment.