I have a symfony2 application.
On the prod server I want all my routes to go via https, while in dev I want to be able to use http. How do I achieve that with symfony2 a
I think you can check the scheme in app_dev.php
file and base on that redirect it to https
$url = parse_url($_SERVER['HTTP_REFERER']);
if ($url['scheme'] == 'http') {
header("Location: https://{$_SERVER['SERVER_NAME']}{$_SERVER['PHP_SELF']}");
}
Or maybe able to apply some changes in .htaccess
for app_dev.php
in URL