1

I tried many ways to remove index.php in my project. here's ways

here is my route file

$route['default_controller'] = 'auth/login';
$route['signin'] = 'auth/login';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;

this is my htacess file

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$1 [PT,L]

In config file

<Directory "C:/xampp2/cgi-bin">
    AllowOverride All
    Options None
    Require all granted
</Directory>

Still index.php needed. what can i do for remove this ?

2 Answers 2

0

in your config,

$config['index_page'] = 'index.php';

replace to :

$config['index_page'] = '';
Sign up to request clarification or add additional context in comments.

4 Comments

LoadModule setenvif_module modules/mod_setenvif.so This one enabled
found text #LoadModule rewrite_module modules/mod_rewrite.so and remove # then save, restart you apache
actually it's going well, but try this on file .htaccess: <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] </IfModule>
please chek this link
0

In .htaccess file i create this

RewriteEngine On
RewriteBase /project_name
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]

and it works for me.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.