Codeigniter: from localhost to webserver Codeigniter: from localhost to webserver codeigniter codeigniter

Codeigniter: from localhost to webserver


First:

No, you should safe-delete it. cgi-bin historically was the only place where executable or script code (binaries, shell scripts, etc.) could be stored. It is mostly a historic relic since most hosts allow execution of scripts from anywhere.

When a .htaccess file is placed in a directory which is in turn 'loaded via the Apache Web Server', then the .htaccess file is detected and executed by the Apache Web Server software..htaccess can be content password protection or image hot link prevention.

Second:

You should edit .htaccess in ./website folder.

And:

My file .htaccess run in server like this:

<IfModule mod_rewrite.c>RewriteEngine onRewriteCond $1 !^(index\.php|resources|robots\.txt)RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^(.*)$ index.php?$1 [L,QSA]</IfModule>

Updated:

Let tried again with another method.

  1. Make below changes in application/config.php file

    $config['base_url'] = 'http://'.$_SERVER['SERVER_NAME'].'/Your Ci folder_name';$config['index_page'] = '';$config['uri_protocol'] = 'AUTO';
  2. Make .htaccess file in your root directory using below code

    RewriteEngine onRewriteCond $1 !^(index\.php|resources|robots\.txt)RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^(.*)$ index.php/$1 [L,QSA]

Note: remove <IfModule mod_rewrite.c></IfModule>