![]() |
Cannot remove index.php in Codeigniter 2.1.3 - 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: Cannot remove index.php in Codeigniter 2.1.3 (/showthread.php?tid=55355) |
Cannot remove index.php in Codeigniter 2.1.3 - El Forum - 10-22-2012 [eluser]huskyfritz[/eluser] Hello guys, I want to remove index.php in my url but the solutions I searched from the net is not working. I also look in the documenation of codeigniter but still not working. I am using Codeigniter 2.1.3. I changed Code: $config['index_page'] = 'index.php'; Code: $config['index_page'] = ''; I placed my .htaccess file under application folder with the lines of code: Code: # Customized error messages. When I am trying to browse the url(w/o index.php): domain/controller/ I get a 404 page which the browser cannot locate the controller. Please help me because I am beginner in this framework. Thanks! ![]() Cannot remove index.php in Codeigniter 2.1.3 - El Forum - 10-23-2012 [eluser]Aken[/eluser] The rewrite .htaccess goes in the same folder as your index.php. The application folder has its own .htaccess already that you usually should never modify. Cannot remove index.php in Codeigniter 2.1.3 - El Forum - 10-23-2012 [eluser]huskyfritz[/eluser] Thanks Aken! its now working. ![]() Cannot remove index.php in Codeigniter 2.1.3 - El Forum - 10-28-2012 [eluser]Unknown[/eluser] I have to remove index.php from my url as well as i am using SSL connection for all pages so i write .htacces file like following way. i write .htaccess file in Docuemtroot directory where code igniter installed and one another .htaccess already in application directory. I followd this steps but my problems not solved. RewriteEngine On RewriteCond $1 !^(index\.php|resources|robots\.txt) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L,QSA] RewriteCond %{SERVER_PORT} 443 RewriteRule ^(.*)$ https://<IP>/$1 [L] If i write code for rewriting to https in .htacess of application directory then its rewriting all http request to https ..thats fine for me ..But i also want to remove index.php..But if i append code in .htaccess for removing index.php doesnt work for me. |