Reputation: 177
I have a Symfony2 website and domain with ssl. Every time I try to login or logout Symfony redirects me from http to https. I know that login should have secure connection, but right now I need to force Symfony not to use ssl. How can I do it?
Upvotes: 2
Views: 1534
Reputation: 7163
There you have probably set the requires_channel
property to https.
access_control:
- path: ^/login
roles: IS_AUTHENTICATED_ANONYMOUSLY
requires_channel: https
So to not force the use of https, just remove this property.
Have a look at the doc about forcing https or http with the security config.
In routing files, you can force http or https with the schemes
property.
secure:
path: /secure
defaults: { _controller: AcmeDemoBundle:Main:secure }
schemes: [https]
So again, to not force the use of https, just remove that property.
Have a look at the doc about forcing https or http with the routing component.
It is also possible to force https via .htaccess
files with the rewrite module.
If the two previous ways didn't work, check your .htacess
files for rewrite rules/conditions.
Upvotes: 3