I want to remove index.php in the URL, but it does not work. Here is what I did:
- I enable rewrite_module in my Apache and then reboot the server
I am editing .htaccess in my codeigniter folder. I am adding this as per the example in the documentation.
Rewriteengine on
RewriteCond% {REQUEST_FILENAME}! -f
RewriteCond% {REQUEST_FILENAME}! -d
RewriteRule ^ (. *) $ Index.php / $ 1 [L]
Then I also delete index.php in app / config
Then I create a simple controller:
class Users extends CI_Controller {
public function __construct() {
parent::__construct();
}
public function index() {
echo "hello world";
}
}
And when I access this url:
http:
I got this error:
Not Found
The requested URL /order_menu/users was not found on this server.
Can you help me?
source
share