see view directory pages! |
[eluser]CtheB[/eluser]
Michael wales wrote a blog item about this just a year ago: http://www.michaelwales.com/codeigniter/...ting-point
[eluser]WebbHelp[/eluser]
Ok, I thougt I would like the tutorial but I didn't , thanks anyway. I didn't liked it, because it was... strange... he got a directory _base and htodocs like _base/htdocs I just want to make it safier and I thought it was enought to put the application direcoty outside the system folder and change the settings? Thanks //WebbHelp
[eluser]CtheB[/eluser]
This is what you have to do: Put your application outside the system folder. Put BOTH the application folder and the system folder outside the root of your website (1 directory up) so you would have this /system/httpdocs/index.php and /application/httpdocs/index.php (or public_html instead of httpdocs) Next you have to change 2 things in the index.php file: $system_folder = '../system'; $application_folder = "../application"; Now you have a safe installation and you don't need the line at the beginning of your files (as well as you don't need the index.html in your directories anymore)
[eluser]WebbHelp[/eluser]
Aha thanks So I let the index.php file stay and edit it, like you sad, and move the system and application folder back to the root! But I thought I need to change something more for application, because I also move it from the system folder? One things, I got a answer in another thread: "How I did if I got a directory for the admin, and you need to be logged in to see that controller pages. He sad that I could in a function __constructo(); see if the adminsession exists, if it exists then nothing will happened, but if the admin session don't exists, then I go with redirect(); to another page, and send some flashdata to write out a message! That sounds like a good idé but I just want to know if there is another solution to, I think that is a good thing to know! Thanks //WebbHelp
[eluser]cahva[/eluser]
[quote author="webbhelp" date="1260467679"]Aha thanks So I let the index.php file stay and edit it, like you sad, and move the system and application folder back to the root! But I thought I need to change something more for application, because I also move it from the system folder? [/quote] No, thats it You only have to inform codeigniter where the application and system folder is relative to index.php file. I've attached a picture from my project so you understand fully how the tree goes. [quote author="webbhelp" date="1260467679"] One things, I got a answer in another thread: "How I did if I got a directory for the admin, and you need to be logged in to see that controller pages. He sad that I could in a function __constructo(); see if the adminsession exists, if it exists then nothing will happened, but if the admin session don't exists, then I go with redirect(); to another page, and send some flashdata to write out a message! That sounds like a good idé but I just want to know if there is another solution to, I think that is a good thing to know! [/quote] Its better if you continued that question in the other thread so this does not go off-topic(as it got nothing to do with the original issue). Im not a moderator here but just a thought
[eluser]WebbHelp[/eluser]
Thanks for reply, and thanks for the image! I see... nice haha yes that's true, but I am a great "oftopicer" hehe I think that I have understood it all now, thanks to you all |
Welcome Guest, Not a member yet? Register Sign In |