[eluser]waterloomatt[/eluser]
Hi,
I'm looking for some design advice. I want to setup my site so when a user tries to access a restricted area, they are redirected to the login page. After a successful login, I want them redirected to the original page that redirected them.
Initial thought:
1. Store each page URI in the session.
2. After successful login, redirect user to page.
3. This will keep the URL clean. I.e. No "?redirect=forum/12" or "/redirect/forum/12".
Issues:
1. Don't store the URI of certain pages. Ex. The Logout URI - this will create a loop of Logout->Login->Logout->Login etc.
2. Maybe a heavy handed approach to pages that don't require login Ex. About Us, Contact etc.
Do you have any suggestions or a cleaner/lighter solution?
Cheers.