• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] delete index.php

#1
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.
" If I looks more intelligence please increase my reputation."
Reply

#2
It's in the User's Guide.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply

#3
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.
" If I looks more intelligence please increase my reputation."
Reply

#4
turn on mod_rewrite
Reply

#5
1.httpd.conf file. set "AllowOverride" to "All"
2.Confirm mod_rewrite.so is on.
3. restart apache
Reply

#6
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.
" If I looks more intelligence please increase my reputation."
Reply

#7
This one solved. I simply have to put .htaccess on the root folder of CI.
" If I looks more intelligence please increase my reputation."
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.