Welcome Guest, Not a member yet? Register   Sign In
Empty $this->input->get_post in controller whereas $_POST has value at index.php
#4

On one of my sites, I used this in the site's .conf file:

Code:
<VirtualHost *:80>
    ServerName my.server.name
    Redirect 301 / https://myserver.url.here/
</VirtualHost>

Since HTTP and HTTPS are on different ports, configuring port 80 to redirect to HTTPS works pretty well. Of course, this is probably the wrong status code and you probably want to handle things a little more elegantly, but it's a start. This is also intentionally driving all of the traffic to HTTPS, which may not be what you're looking for.

I found that supporting both and ensuring that HTTPS was used everywhere it should be was usually not worth the effort (compared to just pushing as much traffic as possible to HTTPS), and just setting the base URL on the site to use https:// significantly reduced the number of odd issues that would crop up.
Reply


Messages In This Thread
RE: Empty $this->input->get_post in controller whereas $_POST has value at index.php - by mwhitney - 09-28-2016, 01:49 PM



Theme © iAndrew 2016 - Forum software by © MyBB