JasonBaier / ci3-fire-starter

NOW THAT CODEIGNITER 4 HAS BEEN RELEASED, THIS PROJECT WILL NOT BE UPDATED ANYMORE. CI3 Fire Starter is a CodeIgniter3 skeleton application that includes jQuery and Twitter Bootstrap. It is intended to be light weight, minimalistic and not get in your way of building great CodeIgniter 3 applications.
MIT License
153 stars 152 forks source link

redirect to /htdocs? #23

Closed evansharp closed 8 years ago

evansharp commented 8 years ago

Hi Jason,

Loving the looks of your skeleton and want to try it out on a new project. Feel like I'm missing something though: should I be using an .htaccess redirect at the web root to serve the htdocs directory? Can't find anything about the CI index.php in your readme, as it's not where I expect it to be.

Thanks! Evan

JasonBaier commented 8 years ago

Hi Evan,

The contents of the htdocs folder should be in your web root. For example, on Bluehost, the webroot is 'public_html'. Application and system should be above your web root. If you do that, it should work fine. There's already an .htaccess file in the htdocs folder. Then modify /application/config/core.php and set $config['root_folder'] to match your server's webroot (htdocs, public_html, etc.)

evansharp commented 8 years ago

Jason, Thanks for the quick reply! Does Fire Starter presume/ require this hierarchy? Just curious.

Evan

JasonBaier commented 8 years ago

It can be changed, but this is the recommended structure for best security.

Snipees commented 7 years ago

If you are not using a vhost, for example if the starter-kit is installed in the www/ci3-firestarter/ folder (www being your web-root) Add a .htaccess file to the www/ci3-firestarter/ folder with the following contents:

RewriteEngine On
RewriteRule ^$ htdocs [L]

And in the config.php file, modify the base_url like this:

$config['base_url'] = 'http://localhost/ci3-firestarter/htdocs/';

So, in your browser, when you access this url:

 http://localhost/ci3-firestarter/

You will be automatically redirected to:

 http://localhost/ci3-firestarter/htdocs/