New to code Igniter Project |
[eluser]revanth[/eluser]
Hi, I am developing a project in codeigniter. I am getting some problem plz help me. The problem is here is the url of the project http://localhost/wigscodeig/ here is the url when i am doing this i am getting my project but when i go into the links and when i am going into the subcategories the url is http://localhost/wigscodeig/wigs/subcategories/3 i am getting an error as page not found here my controller name is wigs and in that i had a function with subcategories but it getting not found plz help me in that situation
[eluser]n0xie[/eluser]
Does this work? Code: http://localhost/wigscodeig/index.php/wigs/subcategories/3
[eluser]revanth[/eluser]
<?php class Wigs extends Controller { function Wigs() { parent:: Controller(); //$this->load->helper('url'); $this->load->model('wigsmodel'); $wigs['title'] = ":: VGS Resource ::"; $wigs['categories'] = $this->wigsmodel->getcategories(); $this->load->view('header', $wigs); } function index() { $this->load->view('wigsview'); } function subcategories($id) { $this->load->view('subcategories'); } } ?> this is my controller function i just tried wheter it works or not it doesn't work and if the url ls like this it was working http://localhost/wigscodeig/index.php/wi...tegories/1
[eluser]revanth[/eluser]
No I does not have any htaccess file in root directory
[eluser]stommert[/eluser]
Hi, What you probably did was changing Code: $config['index_page'] = 'index.php'; Code: $config['index_page'] = ''; Code: <IfModule mod_rewrite.c> you might want to read op on this topic I hope this does the trick.
[eluser]revanth[/eluser]
no i wasn't removed the index.php in $config['index_page'] = ''; this line
[eluser]stommert[/eluser]
Why do you expect this Code: http://localhost/wigscodeig/wigs/subcategories/3 If you want that to work then you have to change your config and place the .htacces file in your siteroot. Else you just have to work with this Code: http://localhost/index.php/wigscodeig/wigs/subcategories/3
[eluser]revanth[/eluser]
k thanq for this suggestion why i expect that one is for i dont want to have index.php in my url
[eluser]Unknown[/eluser]
All you need is to follow this tutorial, which I find the only one that really works for me: Removing index.php and setting the .htaccess file |
Welcome Guest, Not a member yet? Register Sign In |