Reputation: 1287
I am new to codeigniter frame work. I have installed CodeIgniter 2.1.4 version. I set up the application and system path in my local wamp server. The front end opens fine.
But when i try to open the admin i.e http://siteurl/CodeIgniter_2.1.4/admin
it shows as 404 not found. In application >> controllers >> admin.php is found (Hope this is for admin panel)
Then why it shows as 404 not found. Shall i made any setup for admin url? Please help me. Thanks
Upvotes: 0
Views: 1533
Reputation: 20753
You will need multiple things in place in order to achieve this:
$config['index_page']
to an empty string in application/config/config.php
You will have to rewrite the requests coming in, for example with apache you will need to have rewrite rules like this:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1/ [L,QSA]
You can put them into a file called .htaccess
next to the index.php
(your webserver need to be configured to support these kind of files for this to work)
index
inside your admin.php, inside a class called Admin
.Upvotes: 2