I'm having some issues with CodeIgniter redirects on Heroku. Here is the URL:
http://sergei-game.herokuapp.com/
In particular, what is happening is that the redirects (/controller/function) are being appended to the URL rather than replacing /controller/function in the URL.
I do not have these issues when I navigate to the same URL on localhost.
Here is the relevant code in the main controller:
public function index() {
redirect('gameplayer/login', 'refresh');
}
public function login() {
if (isset($_SESSION['email'])) {
// if logged in, go to character selection page
redirect('gameplayer/viewAccount');
} else {
$this->load->view('auth/login');
}
}
Here is my .htaccess file
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
I took a look at the Heroku logs, but they don't make very much sense to me.