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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:15:50+00:00 2026-06-13T16:15:50+00:00

The index page (aka homepage.php) in my code igniter install is working fine no

  • 0

The index page (aka homepage.php) in my code igniter install is working fine no matter what.

The problem lies with using subdirectories to store other pages, currently its setup like:
img1

loading homepage like http://localhost/VAw_CI/ works fine (loading homepage.php), this is setup in routes.php:

$route['default_controller'] = "pages/homepage";

in config.php, I’ve setup:

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

/*
|--------------------------------------------------------------------------
| Index File
|--------------------------------------------------------------------------
|
| Typically this will be your index.php file, unless you've renamed it to
| something else. If you are using mod_rewrite to remove the page set this
| variable so that it is blank.
|
*/
$config['index_page'] = '';

I specified $config['index_page'] = ''; above, because I modified my .htaccess located in htdocslike:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .*homepage/$0 [PT,L]

However, if I try to login on homepage.php, which is currently looks like:
img2

It sends me to http://localhost/VAw_CI/pages/clientlogin

displaying:
img3

I have controllers setup like:
img4

What gives here? When I visit http://localhost/VAw_CI, it is effectively loading the views->pages->homepage.php view properly, but it seems any other view doesn’t work am I missing some path setup somewhere for pages other than the index (homepage.php) in my case?

  • 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-06-13T16:15:52+00:00Added an answer on June 13, 2026 at 4:15 pm

    please create .htaccess file in project folder and write:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    
    # Rewrite all other URLs to index.php/URL
    RewriteRule ^(.*)$ index.php?url=$1 [PT,L] 
    
    </IfModule>
    <IfModule !mod_rewrite.c>
     ErrorDocument 404 index.php
    </IfModule>
    

    You don’t need to define in base_url in config file:

    $config['base_url'] = ''; // blank it.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an index page index.php , and when the user clicks on a
I have the following link on index page <td align=center><a href=../athena/admin/update.php?id=' . $data [keyword]
I need to redirect user to another page called free.php from index page, if
I have a page, index.php, that shows information based on a mysql db. There
I have my index page INDEX.html and a PHP page TEST.php then an autosuggest
So I have the index.php page. <?php session_start(); if (!isset($_SESSION['var1'])) { echo session not
I want to copy my Homepage (index page) and make the copy appear on
Here is the issue: I have a page index.php and onclick of select element
Button on index page: $('#killsession').click(function() { $.get('killsession.php'); alert(OK); }); killsession.php : <?php session_start(): session_destroy();
On my index.php page I use the jquery load() to load other pages in

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.