CodeIgniter Forums
Help to remove index.php from url - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Help to remove index.php from url (/showthread.php?tid=6152)



Help to remove index.php from url - El Forum - 02-16-2008

[eluser]finord[/eluser]
Hello, i read a lot of post about remove de index.php, but i doesn't work.
I working usin Xampp on windows, the folders:
Code:
+htdocs
-ci<---CI root directory
  -user_guide
  -system
   -application
   -controller
   -.....

This is my .htaccess file, and this put in the folder ci.

Code:
<IfModule mod_rewrite.c>
Options -Indexes

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

And the config:
Code:
$config['base_url']    = "http://localhost/ci/";


$config['index_page'] = "";


$config['uri_protocol']    = "AUTO";

If a try to acces noticias(system/application/controller/noticias.php), give a Error 404.

Can anyone please help me

Thanks


Help to remove index.php from url - El Forum - 02-16-2008

[eluser]Pascal Kriete[/eluser]
Did it work with index.php included? Is it an apache or a CI 404 error?
Your picture looks like you put the ci folder next to htdocs - I'm assuming it's inside.


Help to remove index.php from url - El Forum - 02-16-2008

[eluser]finord[/eluser]
Yes work with index.php/noticia.
Give this error
Quote:Error 404
localhost
02/16/08 13:31:57
Apache/2.2.6 (Win32) DAV/2 mod_ssl/2.2.6 OpenSSL/0.9.8g mod_autoindex_color PHP/5.2.5

And yes, ci is in the htdocs folder.


Help to remove index.php from url - El Forum - 02-16-2008

[eluser]mooger[/eluser]
[quote author="finord" date="1203187911"]Yes work with index.php/noticia.
Give this error
Quote:Error 404
localhost
02/16/08 13:31:57
Apache/2.2.6 (Win32) DAV/2 mod_ssl/2.2.6 OpenSSL/0.9.8g mod_autoindex_color PHP/5.2.5

And yes, ci is in the htdocs folder.[/quote]

Did you enable mod_rewrite?

Go to \xampp\apache\conf and open httpd.conf in a text editor

Find this line
#LoadModule rewrite_module modules/mod_rewrite.so

and uncomment it
LoadModule rewrite_module modules/mod_rewrite.so

restart Apache and see if it works.


Help to remove index.php from url - El Forum - 02-16-2008

[eluser]finord[/eluser]
Ahh ok now work Big Grin

Thanks men!Bye


Help to remove index.php from url - El Forum - 11-07-2013

[eluser]Unknown[/eluser]
i am new bie for CI

thanks for your posts