如何使codeigniter文件夹我的根文件夹?

I have put the codeigniter files in a separate folder called CI_Folder. This folder is in the root directory. index.php also resides in the root directory.

Currently when I enter the URL www.xyz.com, index.php is displayed.

I want to make a website in codeigniter so that when someone enters www.xyz.com he should see the webpage which the controller is loading i.e he should be redirected to the CI_Folder.

Is this possible? If yes how should I go about it?

Thanks

Don't know why you want to do that, anyway it's as easy as:

  1. Place the codeigniter's index.php in your root directory
  2. Open said index.php and change the $system_path and $application_folder to reflect the position of your folders. For example, if you place the whole "codeigniter" folder in you root, it would be:

     $system_path = './codeigniter/system';
     $application_folder = './codeigniter/application';
    

This is your folder structure now:

[webroot]
     index.php  (taken out from codeigniter package)
     codeigniter/
          application/
          system/

In index.php file of the codeigniter(in codeigniter folder) there is option to specify location and name of system folder and application folder. Specify them and use .htaccess

I have my following rewrite options

 <IfModule mod_rewrite.c>
  Options +FollowSymlinks
  RewriteEngine On
 </IfModule>

<IfModule mod_rewrite.c>
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ /index.php?$1 [L]
</IfModule>

Modify as appropriate for your requirement. I hope it helps.