Closed j0inty closed 7 years ago
@j0inty
Thank you for your feedback.
But your htaccess is for the default folder structure of CodeIgniter.
This installer changes folder structure. That is, it moves index.php
into public
folder.
In the folder, there is no system
and application
folders.
And this installer assumes you set the public
as your web root (document root). If you set your web server correctly, there is no way to access system
and application
folders via HTTP.
The other differences are the ?
in RewriteRule ^(.*)$ index.php?/$1 [L]
and RewriteBase /
.
I'm not sure we need them.
@kenjis It is good to check if a module is enabled or not; otherwise apache may throw errors (Internal Server Error, 500), which is hard to debug sometimes. For example : WordPress also do this, see here
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
Just add if condition and you are good to go.
@ankurk91 Thank you for your comment. I added <IfModule>
.
Hi,
I found this .htaccess file some days in a forum and use it for all my I projects running with apache webserver.
Hope it helps a little bit ;)
regards j0inty