Eliminating the index.php - 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: Eliminating the index.php (/showthread.php?tid=56623) |
Eliminating the index.php - El Forum - 01-08-2013 [eluser]GabrieleMartino[/eluser] I didn't delete! Eliminating the index.php - El Forum - 01-08-2013 [eluser]Rowan Wilson[/eluser] Both CroNIX's and my .htaccess should work for you in Apache, so I would guess your server is not configured for mod_rewrite correctly. There are many guides available. Try here: http://stackoverflow.com/questions/857516/online-mod-rewrite-testing-tool If all that works and you are happy mod_rewrite is working how it should, come back and let us now and we will have a look at your code. Eliminating the index.php - El Forum - 01-08-2013 [eluser]GabrieleMartino[/eluser] I think i'm getting confused. In the sense that or is a problem of the server and here my phpinfo(); tell me that the mod_rewrite is loaded. Or is a problem of regular expression. That i don't know and i have to study on. But I think I must before understand where is located the problem if in the first hypotesys or the latter. There is a way to check on the server if the module is working more properly or the phpinfo() is enough reliable? Eliminating the index.php - El Forum - 01-09-2013 [eluser]GabrieleMartino[/eluser] [quote author="Rowan Wilson" date="1357638787"]Try this one: Code: RewriteEngine on The filename is how you've already written it: .htaccess and it must live in the root of your CI installation at the same level as application and system. FYI the dot in the filename makes it a hidden file if you are looking for it in the terminal. [/quote] Hi again, I fix the connection with mod_rewrite that is enabled and the site I get it read the htaccess. Now i tryed some htaccess but no any works. The site open in main page but when I go with a link i get /controller/method , on the address bar, and it display 404 error not found in the page If i still digit by hand on the address bar /index.php/controller/method it works. What's happen? How can I use the link you gave me ? Eliminating the index.php - El Forum - 01-09-2013 [eluser]Rowan Wilson[/eluser] ok cool. How about showing us where you have your .htaccess file in your CI installation. Also, it might also be worth seeing your controller code. Eliminating the index.php - El Forum - 01-09-2013 [eluser]GabrieleMartino[/eluser] [quote author="Rowan Wilson" date="1357725216"]ok cool. How about showing us where you have your .htaccess file in your CI installation. Also, it might also be worth seeing your controller code.[/quote] I have the folder Code: CI - Application - controller Eliminating the index.php - El Forum - 01-09-2013 [eluser]Rowan Wilson[/eluser] ok good. Are you using Apache or something else. What do you have in your config.php, base_url, uri_protocol etc? Also post your htaccess file as well. Eliminating the index.php - El Forum - 01-09-2013 [eluser]GabrieleMartino[/eluser] [quote author="Rowan Wilson" date="1357727262"]ok good. Are you using Apache or something else. What do you have in your config.php, base_url, uri_protocol etc? Also post your htaccess file as well.[/quote] My htaccess file is the one of you mentioned before, I tried also the one of Chronix and the one in the user guide. My config file is Code: $config['base_url'] = 'http://localhost/safememoirs'; I'm using Apache 2.2 On my route I have only the following Code: $route['default_controller'] = 'pages/home'; Eliminating the index.php - El Forum - 01-09-2013 [eluser]Prullenbak[/eluser] If all is set like you say it is, this url: http://localhost/safememoirs/ would show you the home function in the pages controller, as would http://localhost/safememoirs/pages/home/ and http://localhost/safememoirs/index.php/pages/home and even http://localhost/safememoirs/index.php Eliminating the index.php - El Forum - 01-09-2013 [eluser]GabrieleMartino[/eluser] [quote author="Prullenbak" date="1357728783"]If all is set like you say it is, this url: http://localhost/safememoirs/ would show you the home function in the pages controller, as would http://localhost/safememoirs/pages/home/ and http://localhost/safememoirs/index.php/pages/home and even http://localhost/safememoirs/index.php [/quote] Sorry I didn't get it, can you explain again,please? |