Welcome Guest, Not a member yet? Register   Sign In
Codeigniter and htaccess mod_rewrite
#9

[eluser]Mr. Pickle[/eluser]
First of all, if you installed the .htaccess correctly you don't have to use index.php at all.
The purpose of the .htaccess file (like Felipe posted) is to be able to remove the index.php (including the ?) from the urls.
This also corresponds with the fact that you in your config file have an empty $config['index_page'] instead of $config['index_page'] = 'index.php'

To explain why you need the ?, this is because CodeIgniter runs on the bootstrap file index.php (meaning all requests go through this one index.php file. The actual paths after index.php should therefore by url parameters. The .htaccess file simulates the same situation.

----

I would recommend to put the application folder outside the webroot (to prevent access over the web)
The index.php (bootstrap file), .htaccess and the assets (css, js, images) of course within the webroot.
this means:





Messages In This Thread
Codeigniter and htaccess mod_rewrite - by El Forum - 10-21-2012, 03:56 AM
Codeigniter and htaccess mod_rewrite - by El Forum - 10-22-2012, 04:48 AM
Codeigniter and htaccess mod_rewrite - by El Forum - 10-22-2012, 05:35 AM
Codeigniter and htaccess mod_rewrite - by El Forum - 10-22-2012, 05:59 AM
Codeigniter and htaccess mod_rewrite - by El Forum - 10-22-2012, 06:02 AM
Codeigniter and htaccess mod_rewrite - by El Forum - 10-22-2012, 06:10 AM
Codeigniter and htaccess mod_rewrite - by El Forum - 10-22-2012, 06:24 AM
Codeigniter and htaccess mod_rewrite - by El Forum - 10-23-2012, 04:26 AM
Codeigniter and htaccess mod_rewrite - by El Forum - 10-23-2012, 04:57 AM
Codeigniter and htaccess mod_rewrite - by El Forum - 10-23-2012, 10:52 PM



Theme © iAndrew 2016 - Forum software by © MyBB