Page 1 of 1

Problem with default Page

Posted: Fri Mar 17, 2017 2:44 am
by Bishu

I have 2 custom file
1) home.php ---- I have made this as a default page (Security given to the registered user only)

2) contact.php ---- Security given to the anonymous user.

Now when I open my url, it directly open the contact.php page.
I want to make the login.php page as a default for the anonymous user.


Re: Problem with default Page

Posted: Fri Mar 17, 2017 9:22 am
by mobhar

Simply put the following code in "Page_Redirecting" server event under "Server Events" -> "Other" -> "Default Page":

if (!IsLoggedIn()) {
$url = "login.php";
} else {
$url = "home.php";
}