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

  • Home
  • SEARCH
  • 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 4021204
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:19:22+00:00 2026-05-20T10:19:22+00:00

My current development is using CodeIgniter, and when I try to pass some parameters

  • 0

My current development is using CodeIgniter, and when I try to pass some parameters to index function of my main controller it returns me 404 error.

http://localhost/gis/1 -> 404 ERROR
http://localhost/gis/home/1 -> 404 ERROR

Actually my route.php file has a route like this:

$route['default_controller'] = "home";    

$route['home/([:num])'] = 'home/index/$1';

My .htaccess file is this (from this post to take away index.php from CI urls):

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    RewriteCond %{REQUEST_URI} ^application.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d

    RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
    # If we don't have mod_rewrite installed, all 404's
    # can be sent to index.php, and everything works as normal.
    # Submitted by: ElliotHaughin

    ErrorDocument 404 /index.php
</IfModule>

And my config.php file:

$config['base_url'] = "http://localhost/gis";

$config['index_page'] = "";

What am I doing wrong? Thanks!

  • 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-20T10:19:22+00:00Added an answer on May 20, 2026 at 10:19 am

    Update:

    Quoting OP:

    .htaccess wasn’t guilty. The problem
    was that my route needs to be
    $route[‘home/(:num)’] = … I added
    both parenthesis and all works.


    Rather than:

    $route['home/([:num])'] = 'home/index/$1';
    

    Try specifying it like this:

    $route['home/:num'] = 'home/index/$1';
    

    Also make sure that from application/config/routes.php, your default controller is set to home:

    $route['default_controller'] = 'home';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My current development project has two aspects to it. First, there is a public
The situation: I need to convert our current development environment from Windows XP 32-bit to
If we need to issue a bug patch that does not include current development
On the web page, it looks like there is no current development in the
In our current database development evironment we have automated build procceses check all the
We're about to embark on development of a new product. Our current product is
Current, I've got a stored procedure that has a main goal of doing a
Our current development environment at work is Windows XP pro. It is a fine
We are using feature branches in Subversion for our development which is a very
I've just purchased a Mac and am beginning to explore software development using Cocoa

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.