CI in a subfolder |
[eluser]hcabbos[/eluser]
This is the first time I've ran CI on Windows (IIS) server. I can run CI at the root (within my www folder) but NOT in a subfolder. I get a page not found error. Follow me… I download the latest CI and rename the unzipped folder as "test." I change nothing else except that. I then upload that folder to the server. The URL is now: http://www.domain.com/test/index.php Shouldn't I be able to access it without modifying anything except the config.php file which should read: Code: $config['base_url'] = "http://domain.com/test/"; I've tried everything. Is there something I'm missing?
[eluser]Azafar[/eluser]
@hcabbos are you using any htaccess file? if your using any htacess file mention that subdirectory in it
[eluser]hcabbos[/eluser]
No, there is no htaccess file. My hosting company (IIS-based) doesn't have it or the Windows equivalent.
[eluser]hcabbos[/eluser]
Can anyone at least confirm that the base_url as noted above is the only setting that should need modified? CI should be able to be dropped in any folder and work, correct?
[eluser]hcabbos[/eluser]
The solution was *not* using Auto or Path_Info for URI PROTOCOL in config.php. And for any newbies, setting $config['base_url'] to anything beyond the base url (domain.com) doesn't appear to be needed. Azafar, I appreciate your taking the time to comment.
[eluser]Azafar[/eluser]
@hcabbos i can help you to fix your problem cause i have been set the codeigniter's environment on windows, linux and ubantu as well. But i am not understanding what is ur actual problem. Let me tell you the way how we set the environment in windows with and without htaccess. Without htaccess Step1: Place your CI files in your subdirectory Step2: Modify Config file and change the base_url according to your sub directory eg $config['base_url'] = "http://domain.com/test/"; This is the only change in your config file With htaccess Step1: Enable mode_rewrite.so from your httpd.conf Step2: Place all of your ci files in your sub directory Step3: Open config file and do the following changes $config['base_url'] = "http://domain.com/test/"; $config['index_page'] = ""; save it and close the config file Step4: Place the .htaccess file and enjoy codeigniter ![]() Note: Don't forget to mention sub directory name in your htaccess. And if you are using CI without htaccess $config['index_page'] should not be empty. These are some steps to set CI environment on windows. Hope it will work for you. Sorry if i missed anything. Regards...........
[eluser]hcabbos[/eluser]
Azafar, I already found the solution to my problem. See my earlier replies in this thread.
|
Welcome Guest, Not a member yet? Register Sign In |