Wednesday, February 23, 2011

create and configure htaccess for codeigniter

  1. Create .htaccess file on index.php.
    RewriteEngine On
    RewriteBase /sitename
    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php/$1 [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]
    
    
    php_flag display_errors on
  2. Enable rewrite_module on apache server.
  3. Enable include_module on apache server.
  4. Enable cgi_module on apache server.
  5. Enable short open tag on php server.
  6. Configure config.php become.
    $config['index_page'] = "";

0 comments:

Post a Comment