Skip to content

Commit a3238c2

Browse files
rdlabokenjis
authored andcommitted
Add installation of .htaccess
1 parent 2f06448 commit a3238c2

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

dot.htaccess

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
RewriteEngine On
2+
RewriteCond %{REQUEST_FILENAME} !-f
3+
RewriteCond %{REQUEST_FILENAME} !-d
4+
RewriteRule ^(.*)$ index.php/$1 [L]

src/Installer.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ public static function postInstall(Event $event = null)
2727

2828
mkdir(static::DOCROOT, 0755);
2929
copy('vendor/codeigniter/framework/index.php', static::DOCROOT . '/index.php');
30-
30+
copy('dot.htaccess', static::DOCROOT . '/.htaccess');
31+
3132
// Fix paths in index.php
3233
$file = static::DOCROOT . '/index.php';
3334
$contents = file_get_contents($file);
@@ -59,6 +60,7 @@ public static function postInstall(Event $event = null)
5960
unlink(__FILE__);
6061
rmdir('src');
6162
unlink('composer.json.dist');
63+
unlink('dot.htaccess');
6264
unlink('LICENSE.md');
6365
}
6466

0 commit comments

Comments
 (0)