Hi all,

I use codeiniter framework and I am still new to the framework.

I settup a project in a localhost in my pc and I use netbeans id.

I setup route.php in config folder , as $route = "welcome";

when the project is started it shows the url as follows.
http://localhost/projectname/index.php

index method in the welcome controle is as follows.

public function index()
	{
            $data['main_content']='home';
            		//$config['base_url'] = base_url() .'/home/index/';	
		$this->load->view('layout',$data);
                
	}

i have another method temp in welcome controller

<div id="te_menu"> 
            <ul> 
                <li><a href="<?= base_url().'home/index' ?>" class="current">Home</a></li> 
                <li><a href="<?= base_url().'welcome/temp' ?>" target="_parent">Templates</a></li> 
                <li><a href="#">Services</a></li> 
           
                <li><a href="#">About</a></li> 
                <li><a href="#">Contact</a></li> .


            </ul> 
		</div> <!-- end of menu --> 
    
    </div> <!-- end of banner -->

but when I click on the templates tab it shows the url as http://localhost/charitha/welcome/temp and gives error 404

but if I change it to http://localhost/charitha/index.php/welcome/temp

how to set index.php part by default or rename it. if I want it thanks.

plz help me

sory here is the correct code for the view

<div id="te_menu"> 
            <ul> 
                <li><a href="<?= base_url().'welcome/index' ?>" class="current">Home</a></li> 
                <li><a href="<?= base_url().'welcome/temp' ?>" target="_parent">Templates</a></li> 
                <li><a href="#">Services</a></li> 
           
                <li><a href="#">About</a></li> 
                <li><a href="#">Contact</a></li> .


            </ul> 
		</div> <!-- end of menu --> 
    
    </div> <!-- end of banner -->

plz help thx

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.