Can't remove index.php in the url in ci2.0? |
[eluser]chefnelone[/eluser]
Hello In ci1.7 I use this code in .htaccess to remove index.php from the url: (but isn't working in ci2.0) localhost/ci2/.htaccess Code: <IfModule mod_rewrite.c> in application/config/config.php I have: Code: $config['index_page'] = ''; What more do I need to do?
[eluser]chefnelone[/eluser]
I also tried this one: http://ellislab.com/forums/viewthread/172972/#822401 but isn't working neither...
[eluser]Rok Biderman[/eluser]
There is a couple of things that changed since the last release. It's been mentioned here a couple of times in the last week, but this is what has worked for me: for htaccess Code: <IfModule mod_rewrite.c> or Code: <IfModule mod_rewrite.c> both work for me. Be sure to change Code: $config['uri_protocol']="REQUEST_URI"; Don't forget the $system_path and $application_folder in index.php to your folders.
[eluser]chefnelone[/eluser]
[quote author="Coccodrillo" date="1297223561"]There is a couple of things that changed since the last release. It's been mentioned here a couple of times in the last week, but this is what has worked for me: for htaccess Code: <IfModule mod_rewrite.c> or Code: <IfModule mod_rewrite.c> both work for me. Be sure to change Code: $config['uri_protocol']="REQUEST_URI"; Don't forget the $system_path and $application_folder in index.php to your folders.[/quote] Thanks, I set $config['uri_protocol'] = 'QUERY_STRING'; and now is fine.
[eluser]Fribos[/eluser]
[quote author="Coccodrillo" date="1297223561"]There is a couple of things that changed since the last release. It's been mentioned here a couple of times in the last week, but this is what has worked for me: for htaccess Code: <IfModule mod_rewrite.c> or Code: <IfModule mod_rewrite.c> both work for me. Be sure to change Code: $config['uri_protocol']="REQUEST_URI"; Don't forget the $system_path and $application_folder in index.php to your folders.[/quote] Hey, thanks for the info, it helped me but no solved my problem. For some reason i got a 500 Internal Server Error when i was trying to use a not default controller. I must use http://mysite.com/index.php/noDefaultController instead http://mysite.com/noDefaultController.
[eluser]Fribos[/eluser]
Well, i did it !!! It looks like .htaccess must be on root folder instead application folder
[eluser]k7faq[/eluser]
@llusoft If you look closely you should find .htaccess files in several directories now in CI2.0. The / (root) folder contains the one for the mod rewrite commands, etc. All others prevent unauthorized access directly to folders for security.
[eluser]dimasVS[/eluser]
[quote author="Coccodrillo" date="1297223561"]There is a couple of things that changed since the last release. It's been mentioned here a couple of times in the last week, but this is what has worked for me: for htaccess Code: <IfModule mod_rewrite.c> or Code: <IfModule mod_rewrite.c> both work for me. Be sure to change Code: $config['uri_protocol']="REQUEST_URI"; Don't forget the $system_path and $application_folder in index.php to your folders.[/quote] Sorry, but I got error message : Code: Access forbidden! I've been set chmod 777 in all directory. Is there any other way ? Thanks..
[eluser]dimasVS[/eluser]
[quote author="InsiteFX" date="1306076765"]What Operating System are you running? InsiteFX[/quote] Ubuntu 11.04 |
Welcome Guest, Not a member yet? Register Sign In |