header() issues with godaddy

#1
[eluser]jiggs[/eluser]
Specs/Live Server:
CI 1.6.2
Linux on Godaddy (shared)

Local Test Environment:
Windows with XAMPP
Mozilla / IE

Hi Guys!

I need help, been trying to figure this out for about a week now..

Issue is with IE. Mozilla is really a heaven.

Problem description: When logging in my page redirects back to the homepage after entering username and password. Again no issue with mozilla as I am able to login and establish sessions etc..


The Login Code:

Code:
class Login extends Controller{
    function Login(){
        parent::Controller();
        $this->load->library('Session');
        $this->load->model('function_model');
        $this->load->helper(array('form', 'constants', 'url', 'date','menu'));    

    }
    
    function index(){
        
        $data['currpage'] = 'home';
        $data['errmsg'] = 'Please enter username and password.';
      
        $username = $this->input->post('username', TRUE);
        $password = $this->input->post('password', TRUE);
        
        if(!$username && !$password) header("Location: ".base_url());
        if($this->input->post('submit_x') || $this->input->post('submit') || $this->input->post('password')){

            if($this->function_model->userexist($username,$password)) header('location:'. site_url('members/index'));
            else {
                $data['errmsg'] = "Invalid Login. Please try again.";
                $this->load->view('application/index', $data);
            }
        } else $this->load->view('application/index', $data);
    }
}


---------------------------------------------------

My .htaccess on my root

Code:
<IfModule mod_rewrite.c>

Options +FollowSymLinks

Options -Indexes
DirectoryIndex index.php
RewriteEngine on

RewriteBase /

RewriteCond $1 !^(index\.php|img|css|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ index.php?/$1 [QSA,L]

Options -MultiViews
</IfModule>


-----------------------------------------------------------

I strongly think this again has something to do with godaddy. I hope this is just a matter of htaccess issue, again for the third time i mention this, there is no problem with mozilla both in local and live servers. One thing to note though that when you enter a wrong username/password it reads my login code perfectly spitting my "Invalid login" custom error. But when you enter the correct ones, the header does not redirect to the "Members" controller, index function, but it redirects back to site_url('application/index') where the login form resides. Whats funny is there is no line in my code that headers back to this site_url('application/index') page.

This might just be an htaccess issue but i only know basic htaccess Big Grin

Some parameters in my config file:

$config['index_page'] = "index.php?";
$config['uri_protocol'] = "QUERY_STRING";

* index_page and uri_protocol does not seem to help when changing them to blank, AUTO respectively, i get more errors when touching those two settings.


Hit the wall hard.

Please help.

#2
[eluser]jiggs[/eluser]
up

#3
[eluser]jiggs[/eluser]
loosing hope..

#4
[eluser]jiggs[/eluser]
hey this issue is still alive

#5
[eluser]jiggs[/eluser]
okay just when i was about to loose hope. issue just cleared on by itself. i did nothing. maybe stress. case closed.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.