Skip to content

Commit 60a4195

Browse files
committed
Merge pull request #2 from rdlabo/master
Update index_page is blank
2 parents 48f51d9 + c3094c8 commit 60a4195

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ codeigniter/
3636
$ composer create-project kenjis/codeigniter-composer-installer codeigniter
3737
```
3838

39-
Above command installs `public/.htaccess` to remove `index.php` from URL. If you don't need it, please remove it.
39+
Above command installs `public/.htaccess` to remove `index.php` from URL AND `application/config/config.php`'s Line75 edit to `$config['index_page'] = 'index.php';`. If you don't need it, please remove it.
4040

4141
If you want to install translations for system messages:
4242

src/Installer.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,19 @@ public static function postInstall(Event $event = null)
4444
);
4545
file_put_contents($file, $contents);
4646

47-
// Enable Composer Autoloader
47+
// Enable Composer Autoloader AND 'index_page' is blank
4848
$file = 'application/config/config.php';
4949
$contents = file_get_contents($file);
5050
$contents = str_replace(
5151
'$config[\'composer_autoload\'] = FALSE;',
5252
'$config[\'composer_autoload\'] = realpath(APPPATH . \'../vendor/autoload.php\');',
5353
$contents
5454
);
55+
$contents = str_replace(
56+
'$config[\'index_page\'] = \'index.php\';',
57+
'$config[\'index_page\'] = \'\';',
58+
$contents
59+
);
5560
file_put_contents($file, $contents);
5661

5762
copy('composer.json.dist', 'composer.json');

0 commit comments

Comments
 (0)