CI Documentation Tutorial - problem with removing 'index.php' from url, when create News - 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: CI Documentation Tutorial - problem with removing 'index.php' from url, when create News (/showthread.php?tid=60285) |
CI Documentation Tutorial - problem with removing 'index.php' from url, when create News - El Forum - 02-23-2014 [eluser]Unknown[/eluser] Hello! I have a question about remove 'index.php' from url. I used Tutorial from Documentation, change my .htaccess file by Documentation. There is all right, but... When I start http://mysite.com/news/create and post new news - there is redirecting to http://mysite.com/index.php/news/create... but I think, it should be http://mysite.com/news/create. Maybe, it happening, because my app and sys folder placed out public site folder? Out folder 'www'. CI Documentation Tutorial - problem with removing 'index.php' from url, when create News - El Forum - 02-23-2014 [eluser]InsiteFX[/eluser] .application/config/config.php - leave this blank. Code: $config['index_page'] = ''; index.php - for application and system folders outside of it. Code: $system_path = '../system'; .htaccess - my .htaccess file. Code: <IfModule mod_rewrite.c> CI Documentation Tutorial - problem with removing 'index.php' from url, when create News - El Forum - 02-23-2014 [eluser]Unknown[/eluser] InsiteFX You are brilliant! It is a error in my config.php $config['index_page'] = 'index.php'; I should use $config['index_page'] = ''; because (it is comment in config.php): ...If you are using mod_rewrite to remove the page set this variable so that it is blank. Thank you so much! CI Documentation Tutorial - problem with removing 'index.php' from url, when create News - El Forum - 02-23-2014 [eluser]InsiteFX[/eluser] Your very welcome. |