Welcome Guest, Not a member yet? Register   Sign In
redirect() ignores my .htaccess and uses domain_name/index.php/<redirected_url>
#1

[eluser]Unknown[/eluser]
I'm new to codeigniter. My url's are working properly, aka trunk.dev/login/ Till I began working on the login/authentication for my application. When I call the redirect() function to redirect when authentication fails it redirects properly but uses the index.php so my url address points to -> http://trunk.dev/index.php/login instead of trunk.dev/login/

Any thoughts?

Below are my settings.

.htaccess
Code:
RewriteEngine On
RewriteCond $1 !^(index\.php|css|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]


apache-conf
Code:
<VirtualHost 127.0.0.1:80>
   ServerAdmin [email protected]
   DocumentRoot "/www/project"
   ServerName trunk.dev
   <Directory '/www/project'>
        Options All
        AllowOverride All
   </Directory>
   ServerAlias www.trunk.dev
   ErrorLog "/private/var/log/apache2/trunk-error_log"
</VirtualHost>

lastly, my code calling the function
Code:
$handshake = $this->User_model->authenticate($email, $password);
if(!empty($handshake)){
   //authentication success
   redirect('user/', 'location');
} else {
   //throw error because authentication failed and redirect user to loginForm
   redirect('login/', 'location');
}


Messages In This Thread
redirect() ignores my .htaccess and uses domain_name/index.php/<redirected_url> - by El Forum - 10-12-2008, 08:02 PM



Theme © iAndrew 2016 - Forum software by © MyBB