title: FOSUserbundle access control
body: <p>Hi i got an problem with my access control in symfony 2. </p>
  
  <p>I want to secure the whole site except of the "/" route cause there is the login. So every route else, for example "/hello" must be secured and redirect to / if there is no user logged in.</p>
  
  <p>In my security config i got this configuration:</p>
  
  <pre><code>security:
  encoders:
      FOS\UserBundle\Model\UserInterface: sha512
  role_hierarchy:
      ROLE_ADMIN:       ROLE_USER
      ROLE_SUPER_ADMIN: ROLE_ADMIN
  
  providers:
      fos_userbundle:
          id: fos_user.user_provider.username
  
  firewalls:
      main:
          pattern: ^/
          form_login:
              provider: fos_userbundle
              csrf_provider: form.csrf_provider
              login_path: /
          logout:       true
          anonymous:    ~
  
  access_control:
       - { path: ^/, roles: IS_AUTHENTICATED_ANONYMOUSLY }
       - { path: ^/.*, roles: ROLE_ADMIN }
  </code></pre>
  
  <p>What am I doing wrong?</p>