![]() |
Problems configuring CodeIgniter in document root - 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: Problems configuring CodeIgniter in document root (/showthread.php?tid=32230) |
Problems configuring CodeIgniter in document root - El Forum - 07-16-2010 [eluser]Mr. Pickle[/eluser] I've got some problems configuring CI in the document root. My system and application folder is one directory up from the document root. I had the site running within the subdirectory /preview/, so http://www.mysite.com/preview/. Nothing wrong everything worked! In the index.php file I pointed to the system and application folder. /preview/ case (works fine): Code: $system_folder = "../../system"; / case (doesn't work) Code: $system_folder = "../system"; As you might have understood by now, I did not change the location of the application and system folders, only the public index.php initial file. I think it has something to do with the fact that the server is configured to display the file listing if no index file is found (only for the document root, :S) and therefore maybe the .htaccess thinks every request is for an existing file/dir. My client is on very cheap hosting so nothing that I can configure other then some htaccess. Or can you shut down file listing in there? The thing that happens is that it always loads my default controller no matter what I put in my url i can have http://www.mysite.com/bla/bla/bla/bla/bla still and still get the default page of my site. my .htaccess is standard CI stuff: Code: RewriteEngine On Problems configuring CodeIgniter in document root - El Forum - 07-16-2010 [eluser]Mr. Pickle[/eluser] Magically the problem was solved when clearing up the whole server and reinstalling CI after which I put back almost all my original code. Still strange that I did work when simply transferring the index.php to a subdirectory. Well, my problem is solved but I'm still interested if somebody knows more on this issue! |