php - Symfony3 ( or htaccess) enforce HTTPS on specific base url only -


  • i have same symfony3 code base running on 2 servers (urls).
  • both use prod environment , dev environment gets used myself debugging.
  • the 1 has ssl certificate , requires routes forced https scheme. other not , requires normal http scheme.
  • http://symfony.com/doc/current/security/force_https.html explains how force routes https via security.yml

is there way can implement https scheme enforced base url not base url b, other maintaining 2 separate security.yml files?

rewritecond %{https} !=on [or] rewritecond %{http_host} ^prod.yourdomain.com$ [nc] rewriterule ^ https://%{http_host}%{request_uri} [r=301,l] 

now prod.yourdomain.com redirected https.


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -