[SOLVED] Problems with .htaccess not removing index.php in URL. |
[eluser]Moult[/eluser]
I've searched around the forums for quite a bit and it seems as though a lot of people have encountered similar if not the same problem as I have. However, none of the fixes proposed has worked for me, hence I'm going to try and start my own thread to help solve it. Basically, I run CI on my localhost and also on a shared webserver. It works perfectly fine on my localhost, however, on my shared webserver, there are some problems when I try to use the .htaccess file to remove the index.php from the url. Let's say I have just installed CI, I go edit system/application/config/config.php and change the base_url to http://mysite.com/ then I create a new controller with the file name other_page.php. Alright, going to mysite.com loads the welcome controller, as usual, then when I do mysite.com/index.php/other_page, it loads the other_page controller. Works fine. If I load mysite.com/other_page, I get a 404. This is working fine and as expected. Now, I add a .htaccess file in the root dir (same dir as my index.php) with the lines: Code: RewriteEngine on Now, I edit my config.php again to change the index_page from "index.php" to "". (Yes, nothing), as asked by the comments in the file. Ok. Visiting mysite.com still loads the welcome controller, that's good. Visiting mysite.com/other_page DOES NOT load the other_page controller like it should, but still loads the welcome controller. Visiting mysite.com/index.php/other_page loads fine, but it still has the index.php in the URL. What am I doing wrong? |
Messages In This Thread |
[SOLVED] Problems with .htaccess not removing index.php in URL. - by El Forum - 12-14-2008, 06:00 AM
[SOLVED] Problems with .htaccess not removing index.php in URL. - by El Forum - 12-14-2008, 08:05 AM
[SOLVED] Problems with .htaccess not removing index.php in URL. - by El Forum - 12-14-2008, 08:10 AM
[SOLVED] Problems with .htaccess not removing index.php in URL. - by El Forum - 12-14-2008, 08:27 AM
[SOLVED] Problems with .htaccess not removing index.php in URL. - by El Forum - 12-14-2008, 01:35 PM
|