Welcome Guest, Not a member yet? Register   Sign In
CI is ignoring what I sent the index page to
#1

[eluser]php_princess[/eluser]
In config.php I made it so my index page should be local_index.php

Code:
|--------------------------------------------------------------------------
| Index File
|--------------------------------------------------------------------------
|
| Typically this will be your index.php file, unless you've renamed it to
| something else. If you are using mod_rewrite to remove the page set this
| variable so that it is blank.
|
*/
$config['index_page'] = 'local_index.php';

It's still loading index.php Any ideas as to why?

#2

[eluser]jairoh_[/eluser]
remove the .php sir
#3

[eluser]TheFuzzy0ne[/eluser]
That setting is only used for URLs when you use site_url(). To be honest, I don't see why you want to change it. index.php is the default file Apache looks for when you attempt to load a directory without specifying the file. Unless you have your server set up differently, I would suggest sticking with index.php, or setting it to '' if you're using .htaccess with mod_rewrite.
#4

[eluser]php_princess[/eluser]
Thanks for the replies.

I'm trying to make it so I can test my site on my local computer and this is requiring a different index.php file than the remote server needs. The paths to the system and application folders are different in my local environment. I did have them both named index.php but I keep forgetting and accidentally upload the local index.php to the remote server. So that breaks CodeIgniter on the remote server and then I have to fix the remote index file. I was trying to avoid this mishap again by having my local index.php be named something different. Then if it gets accidentally uploaded, oh well.

Now, with that in mind, any ideas?
#5

[eluser]CroNiX[/eluser]
Yes CI has a built in way to have different environments just for that purpose. Set and use the ENVIRONMENT constant in index.php depending on what host or IP the application is on. (use $_SERVER array to detect and set ENVIRONMENT). Then you can do all of your settings based on that environment, like db settings, base_url, application folder, system folder, etc.

You can also load different config files based on the environment. Read this:
http://ellislab.com/codeigniter/user-gui...ments.html





Theme © iAndrew 2016 - Forum software by © MyBB