I want to access my URL's without index.php
in CodeIgniter. Here is my Blog
controller
class Blog extends CI_Controller {
public function index() {
echo 'hello world';
}
public function about() {
echo 'about page';
}
}
Now I can access index
via http://localhost/codeigniter/index.php/Blog
, but I need to access it with this URL http://localhost/codeigniter/Blog
.
NOTE
I removed index.php from config file
.htaccess
file
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
Environment
Windows, XAMPP, PHP Version 5.6.3