Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6652265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:06:54+00:00 2026-05-26T01:06:54+00:00

I have codeigniter installed in root/igniter folder. under root/igniter, I have the following .htaccess

  • 0

I have codeigniter installed in root/igniter folder.

under root/igniter, I have the following .htaccess file:

RewriteEngine On
RewriteCond %{REQUEST_URI} ^/system.*
RewriteRule ^(.*)$ index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?/$1 [L]

Pages open just as I would expect them to without using ‘index.php’.
So, my home page lies at http://example.com/igniter and my registration page at http://example.com/igniter/registration opens as well.

However, in my registration form, the submit button which is handled by a CI controller redirects to

http://example.com/igniter/index.php/registration

I have made sure that my config.php under applications/config has

$config['index_page'] = "";

This is what my Registration controller looks like:

public function index()
    {
        $this->load->helper(array('form', 'url'));
        $this->load->model('Registration_Model');       
        $this->load->library('form_validation');
        $this->form_validation->set_error_delimiters('<div class="error">', '</div>');

        $this->form_validation->set_rules('username', 'Username', 'trim|required|min_length[5]|max_length[12]|callback_username_check|xss_clean');
        $this->form_validation->set_rules('password', 'Password', 'trim|required|min_length[6]|max_length[12]|matches[passconf]');
        $this->form_validation->set_rules('passconf', 'Password Confirmation', 'trim|required');
        $this->form_validation->set_rules('email', 'Email', 'trim|required|valid_email|callback_email_check');

        if ($this->form_validation->run() == FALSE)
        {
            $this->load->view('registration');
        }
        else
        {
            //input data into database here
            $username = strtolower($_POST['username']);
            $password = md5($_POST['password']);
            $email = strtolower($_POST['email']);

            $data = array
                    (
                        'username' => $username,
                        'password' => $password,
                        'email' => $email
                    );

            $this->Registration_Model->addUser($data);  
            $this->load->view('registrationsuccess');
        }
    }

As far as I can see, I am not explicitly asking the controller to redirect to index.php/registration.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T01:06:55+00:00Added an answer on May 26, 2026 at 1:06 am

    Use this in your .htaccess file:

    RewriteEngine on
    
    RewriteCond $1 !^(index\.php|robots\.txt|images|css|js|user_guide)
    RewriteRule ^(.*)$ /index.php/$1 [L]
    

    Note the RewriteRule line in my code. There is no ? mark as you used. In RewriteCond you may use as many folders as you like and the mentioned folders have access. CodeIgniter can not access the resource from any folder that is not listed in RewriteCond here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have codeigniter installed at the root directory, and would like to have a
I have Drupal 7 installed in the root directory of my site. The .htaccess
I have been using the CodeIgniter system for a while now - but it
I have Codeigniter and Ion Auth installed on MAMP. I have the libraries working
I have a directory in the root of my codeigniter application called /css it
I am running CI version 2.1 and I have recently installed the CodeIgniter 2.1
I am using codeigniter and below is my htaccess file. However, i want a
I have a codeigniter code that is working on local Apache installation. But it
I'm tinkering with CodeIgniter and have come across Active Records for the first time.
I have switched on the Codeigniter profile (very useful) and I have noticed that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.