CodeIgniter Forums

Full Version: [SOLVED] delete index.php
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I forget how to set up the .htaccess so that index.php does not appears in the url:

This is what I try:

.htaccess


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


config.php

Code:
$config['index_page'] = '';

Yet, I have not been successful.  I still have to write the index.php in order to make it works.
It's in the User's Guide.
I finally find the link:

https://www.codeigniter.com/user_guide/g.../urls.html

I already copy and paste this to the .htaccess file

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

and still I have to type the index.php to make it works.
turn on mod_rewrite
1.httpd.conf file. set "AllowOverride" to "All"
2.Confirm mod_rewrite.so is on.
3. restart apache
I don't understand in my xampp:

httpd.conf

LoadModule rewrite_module modules/mod_rewrite.so

<Directory />
AllowOverride All
Require all denied
</Directory>

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

AllowOverride All


The first one earlier is set to none, I already change it to all, save it and restart apache. Still I have to put index.php to make it works.
This one solved. I simply have to put .htaccess on the root folder of CI.