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 3662600
In Process

The Archive Base Latest Questions

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

I am using Codeigniter 1.7.2 and HMVC (https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/wiki/Home). I have these files and they

  • 0

I am using Codeigniter 1.7.2 and HMVC (https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/wiki/Home).

I have these files and they are organized according to the HMVC:

system/application/modules/welcome/controllers/welcome.php
system/application/modules/welcome/views/index.php

In the routes.php, I have set up a route:

routes['welcome']='welcome/index';

Everything works if the url is in this pattern:
http://www.mydomain.com/index.php/welcome

But now I would like to remove the index.php from the url, so I created the .htaccess file:

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

Then I set the $config['index_page'] to empty:

$config['index_page'] = "";

Now I can access the page in this url pattern:
http://www.mydomain.com/welcome

Although everything seems to work, I find that every time I access the page, it generates a 404 page not found error in the log:

DEBUG - 2011-01-02 08:28:52 --> URI Class Initialized
ERROR - 2011-01-02 08:28:52 --> 404 Page Not Found --> 

This is not specific to the welcome page, all pages are having the same problem.
I digged into the codes and discovered that this 404 Page Not Found message is generated from the MX_Router.php that comes with HMVC. Specifically, it’s from this function:

public function _validate_request($segments) {      

    /* locate module controller */
    if ($located = $this->locate($segments)) return $located;

    /* use a default 404 controller */
    if (isset($this->routes['404']) AND $segments = explode('/', $this->routes['404'])) {
        if ($located = $this->locate($segments)) return $located;
    }   

    /* use a default 404_override controller CI 2.0 */
    if (isset($this->routes['404_override']) AND $segments = explode('/', $this->routes['404_override'])) {
        if ($located = $this->locate($segments)) return $located;
    }

    /* no controller found */
    show_404();
}

It’s the show_404() function that gets called and therefore I am getting that error message. But since I can access every page without any problem using the url pattern which has index.php removed.

Why is HMVC thinking there’s no controller found in this _validate_request() function?
I will not get the 404 error message in the log if I revert the changes but this also means that I have to keep using the url pattern that has index.php, which looks pretty bad.

Anyone has encountered the same problem before?
Many many thanks to you all.

  • 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-19T01:26:06+00:00Added an answer on May 19, 2026 at 1:26 am

    I think the problem somehow relates to the favicon.ico, some web browsers automatically request yourdomain.com/favicon.ico and if there isn’t one available, it generates a 404 error in the log.

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

Sidebar

Related Questions

Using CodeIgniter's Active Record class and MySQL, I have a table of posts with
Using Codeigniter, I'm able to create a function for user authentication. I have a
I am using codeigniter php MVC framework to develop a web application. I have
I am using Codeigniter framework and I have a form with input fields. When
I am using CodeIgniter to pass some parameters to my PHP page through $_POST
I am writing a webapp using CodeIgniter that requires authentication. I created a model
I am developing a website using CodeIgniter and PHP. Some of my friends suggest
I am thinking of using a PHP framework called CodeIgniter . One of the
Using online interfaces to a version control system is a nice way to have
Using TortoiseSVN against VisualSVN I delete a source file that I should not have

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.