[SOLVED] Move Codeigniter to a Directory |
[eluser]thors1982[/eluser]
Can you move codeigniter to a directory??? I am trying to move my entire web application to a directory and can't seem to get it working. Anyone know why this is happening? I have done it before and it worked fine... but something is breaking it on this server.
[eluser]Mr. Fulop[/eluser]
Hi Thors, Let's assume the following scenario: Your webserver root is here: /home/public_html/ 1) You can put your CodeIngiter(CI) "system" directory outside the /public_html/ folder like this: /home/system/ keeping in your /public_html/application/ just your application files which include all the files and folders from your CodeIgniter archive, except the "system" folder and the files from the root (like index.php ) 2) It is important to modify in your /home/application/index.php the SYSTEM FOLDER NAME. Be sure to provide the full path /home/system (WITHOUT TRAILING SLASH) 3) Make sure the directories have proper directory/files permissions. The biggest advantage in this scenario is that you can develop multiple CI application on the same machine sharing the CI core files stored in one place. Which means that in the future you just have to update your /home/system/ folder with the CodeIgniter files from the new release. I Hope it helps...
[eluser]InsiteFX[/eluser]
In the upcoming CodeIgniter 2.0 they are recommending to put both system and application outside in the server root. So like Mr. Fulop said above you would then have a structure like this. home/system home/application home/public_html/index.php Also in CodeIgniter 2.0 they have already moved the application folder out of the system folder. Enjoy InsiteFX
[eluser]Azafar[/eluser]
Hi Thors, I dont know your actual situation but suppose you have a directory named projectname and a sub directory named beta. You have placed all files in this directory. I am assuming you are working on localhost. First of all see the base url in cofig file. It should be like this http://localhost/projectname/beta/ if this is correct lets go towards the htaccess file and see either you have been mentioned the name of that directory in that file or not. You must have to mention directory name in htaccess too. Place the htaccess on root of your project, means in projectname folder and mention DirectoryIndex in htaccess. Regards....
[eluser]InsiteFX[/eluser]
Do not forget to also edit your index.php file for were your system and application folders are located. Enjoy InsiteFX
[eluser]thors1982[/eluser]
Thanks a lot for your help.... I still don't know how but I eventually fixed it. The structure and files were all fine cause it was working on my local development environment but not our server... No clue what fixed it either but it works now. Thanks again for the help. |
Welcome Guest, Not a member yet? Register Sign In |