mypage/register
、または FOSUserBudnle が作成した他のページにアクセスしようとするたびmypage/
に、登録ページではなくデフォルトのコントローラーにリダイレクトされます。
これらは私のルーティングファイルです:
(app\config\routing.yml)
my_website:
resource: "@MyWebsiteBundle/Resources/config/routing.yml"
prefix: /
fos_user_security:
resource: "@FOSUserBundle/Resources/config/routing/security.xml"
fos_user_profile:
resource: "@FOSUserBundle/Resources/config/routing/profile.xml"
prefix: /profile
fos_user_register:
resource: "@FOSUserBundle/Resources/config/routing/registration.xml"
prefix: /register
fos_user_resetting:
resource: "@FOSUserBundle/Resources/config/routing/resetting.xml"
prefix: /resetting
fos_user_change_password:
resource: "@FOSUserBundle/Resources/config/routing/change_password.xml"
prefix: /{_locale}/profile
もう 1 つ (Resources\config\routing.yml)
mywebsite_first:
pattern: /{_locale}/
defaults: { _controller: MyWebsiteBundle:Default:index }
mywebsite_calendar:
pattern: /{_locale}/calendar
defaults: { _controller: MyWebsiteBundle:Calendar:index }
mywebsite_home:
pattern: /{_locale}/home
defaults: { _controller: MyWebsiteBundle:Home:index }
mywebsite_messages:
pattern: /{_locale}/messages
defaults: { _controller: MyWebsiteBundle:Messages:index }
また、私のsecurity.ymlファイル
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
logout: true
anonymous: true
access_control:
- { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/admin/, role: ROLE_ADMIN }
私は何を間違っていますか?