is there a way to set a the baseurl as absolute path on config/main.php

i want to preserve the https in all the application.

o do I have to create the absolute path in every controller?

You can:

  1. Configure your server to redirect to HTTPS if it’s HTTP.

  2. Do the same in your base controller.

  3. Use //your_url instead of https://your_site/your_url

I would extend CHttpRequest and force every request to be secure using CHttpRequest::getIsSecureConnection()

thank you samdark and dave for your help!