Configuring Codeigniter with Tank Auth

899 Views Asked by At

Something in my CI configuration is missing a "/" that Tank auth view files are expecting and I can't figure it out. I hope you can!

Here are some details: $config['base_url'] = 'http://localhost/CI/';

I do not have .htaccess set up (so I still have index.php in my URI)

When Tank auth loads one of its view files, here is the first line: <?php echo form_open($this->uri->uri_string()); ?>

The resulting URI fails to load since it reads as "http://localhost/CI/index.php?auth/register instead of http://localhost/CI/index.php/auth/register

But, if I modify it to: <?php echo form_open("/".$this->uri->uri_string()); ?> all is well. But this is now how it was meant to work! What did I miss?

Thanks!

1

There are 1 best solutions below

1
On BEST ANSWER

Why not just remove the index.php using .htaccess? That would solve the problem and give you cleaner URL's.

Here't the rewrite I used for my installation of Tank Auth on my localhost.

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php/$1 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /~Steve/_sandbox/tank_auth/index.php/$1 [L]

ErrorDocument 404 /index.php