Welcome Guest, Not a member yet? Register   Sign In
redirect failing on a different server
#1

[eluser]Phil Sturgeon[/eluser]
Recently started doing a bit of work for a client and for some reason my redirect does not work when using the URL helper.

The code:

Code:
function index()
    {
        $this->load->helper('url');
        
        $this->load->library('validation');
        
        $rules['emailAddress'] = "trim|required|valid_email";
        $rules['userType'] = "trim|required";

        $this->validation->set_rules($rules);
            
        if ($this->validation->run() == FALSE)
        {
            $this->load->view('splash');
        }
        else
        {
        
            $row = array(
                'email' =>    $this->input->post('emailAddress'),
                'type'    =>    $this->input->post('userType')
            );
        
            $this->db->insert('Subscriptions', $row);
        
            redirect('/splash/thanks');
        }    
    }

this does not work. It takes them back to the splash.php view instead of rediecting to the "splash_thanks.php"

So thats lame!

When I swap:

Code:
redirect('/splash/thanks');
with
Code:
header('Location: /splash/thanks');

it works fine!!


Messages In This Thread
redirect failing on a different server - by El Forum - 07-15-2007, 05:52 PM
redirect failing on a different server - by El Forum - 07-15-2007, 06:08 PM
redirect failing on a different server - by El Forum - 07-15-2007, 06:16 PM
redirect failing on a different server - by El Forum - 07-15-2007, 06:21 PM
redirect failing on a different server - by El Forum - 07-15-2007, 07:38 PM
redirect failing on a different server - by El Forum - 07-16-2007, 05:45 PM



Theme © iAndrew 2016 - Forum software by © MyBB