Codeigniter form post 403 Codeigniter form post 403 codeigniter codeigniter

Codeigniter form post 403


RewriteEngine onRewriteCond $1 !^(index\.php|images|robots\.txt)RewriteRule ^(.*)$ /index.php/$1 [L]

You have to remove your index.php entry from your /application/config/config.php

Verify that is setup correctly the 403 forbidden error might be due to a faulty .htaccess rewrite.


Please try to modifi your existing controller like below code.

class Revise extends CI_Controller {    function __construct () {      parent::__construct();      $this->load->helper('form');      $this->load->library('form_validation');      if(!isset($_SESSION["logged_in"]) && !isset($_SESSION["username"]) && $_SESSION["logged_in"] !== TRUE && $_SESSION["username"] !== 'example@example.com' )       {        redirect('/login');      } }


RewriteEngine onRewriteCond $1 !^(index.php|resources|assets|robots.txt)RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-d