Change default redirect to login page for private pages

Permalink
I have a membership website. When someone goes to a url of a page that has permissions set for registered users only, they are auto redirected to the login page. I would like to change that so that they are redirected to the home page.

Can anyone tell me how to do that?

Sidenote: I also was wondering under what circumstances someone is directed to the Forbidden page. I know it exists and end up on it sometimes, but don't know why since I seem to be redirected to the login page according the first paragraph I wrote above.

Thanks,

uswebdesigner
View Replies: View Best Answer
mnakalay replied on at Permalink Reply
mnakalay
you need to override concrete/core/controllers/single_pages/page_forbidden.php with concrete/core/controllers/page_forbidden.php (no it's not a mistake, you don't need the single_pages folder)
uswebdesigner replied on at Permalink Reply
uswebdesigner
Thanks Nour,

I am looking at the server, and there is no folder on the server that I see inside concrete called "core". ie.

concrete/core

I see these:

concrete/controllers/page_forbidden.php
concrete/single_pages/page_forbidden.php

So I am not sure what to put where.
mnakalay replied on at Permalink Best Answer Reply
mnakalay
You have to look in the update folder, that's where it is.

Also I made a mistake, you have to put it in root/controllers/page_forbidden.php

Sorry for that

But I already did the change so you don't really have anything to do
uswebdesigner replied on at Permalink Reply
uswebdesigner
I tell you, when I read you already did it, I literally took a deep breath and sign of relief. I am ready to finish up this project.
mnakalay replied on at Permalink Reply
mnakalay
my pleasure :)