Using Symfony 2 it's possible to create secured areas under a specific URL prefix. For example you could have a members area located under a 'members' prefix like so:
www.site.co.uk/members
www.site.co.uk/members/edit
www.site.co.uk/members/settings
Instead of doing this is it possible to put the whole app behind a firewall using /
as the prefix? So the only pages visible to the public are the login and registration pages.
Anyone visiting www.site.co.uk
who isn't logged in would see the login page. Once logged in visiting www.site.co.uk
would show the app's home page instead. Both pages would be under the same route (/
), you would just see one or the other depending on if you are logged in or not.
At the moment setting my firewall's pattern to /
results in a redirect loop because my login form (which is under the homepage route '/') is then behind the firewall.
How do I got about implementing a login process as described above? Is it possible out of the box?
Thanks