Hiding Core System Folders in root of server instead of www folder?????

#11
[eluser]BravoAlpha[/eluser]
On one particular server, I don't have access outside the webroot, but using .htaccess to `deny from all` seems to work...

#12
[eluser]buggzzy[/eluser]
Anybody knows if it's possible to use helper apps like site_url with multiple applications and put the applications and core folder outside the document root?
Trying this since some days but i didn't see anyway to do this without to hack the core libs.

#13
[eluser]John_Betong[/eluser]
Hi All,

On one of my sites I have three separate URL's all with the same DNN that share a single Ci_System folder.

I set the index.php to recognise the URL and jump to the relevant folder. I should imagine the same thing could be achieved by using a .htaccess file?

index.php
Code:
switch ($_SERVER['SERVER_NAME']) {
      case 'localhost'          :
                                  $application_folder = 'system/application'; // ncgecom      
                                  $application_folder = "plaroma-web-vhost";
                                  $application_folder = 'ci_fred';
                                  $application_folder = 'ci_jokes';      
                                  $application_folder = 'ci_betsprint';        
                                  $application_folder = 'ci_rentaroofbox';    
                                  break;
      case 'anetizer.com'       :
      case 'www.anetizer.com'   : $application_folder    = 'ci_jokes';
                                  break;
      case 'betsprint.com'      :
      case 'www.betsprint.com'  : $application_folder    = 'ci_betsprint';
                                  break;
      case 'justjoolz.com'      :
      case 'www.justjoolz.com'  : $application_folder    = 'ci_jokes';
                                  break;
      case 'johns-jokes.com'    :
      case 'www.johns-jokes.com': $application_folder    = 'ci_jokes';         break;
                                  break;
      default                   : // $application_folder = 'ci_rentaroofbox';  break;
  } // end switch

This setup allows having a single set of files that work both for localhost and online. (Similar switch statement for the database.php configuarion).

Currently on my localhost I have to manually select the correct switch statement in the index.php file...

...BUT I have just been introduced to subdomains. I have still not come to terms with the best way of handling numerous sites using this setup - any advice?

Cheers,

John_Betong
 

#14
[eluser]FrankieShakes[/eluser]
[quote author="coolfactor" date="1186470900"]I'm on a Mac, as well. I have a Contextual Menu Item installed called "SymbolicLinker" that gives you the ability to create symlinks from right-click menus. Google it. Very handy thing to have.

Once you have that installed, Put your CodeIgniter system folder where you want it to live, and then when you create a new website, simply right-click on the system folder and choose "Make Symbolic Link". You'll get a file called something like "system symlink". Then just drag that file to where you want it in your new website. Remove the " symlink" off the end, and then just treat it as if it were the real thing. Apache doesn't know any different.

When you go to FTP your files up the server, the real files get uploaded for you. It's almost magical.

(Note: you can not use regular Mac aliases for this. You must use symlinks.)[/quote]

Sweet... I just downloaded SymbolicLinker, and I'll definitely be giving your method a try. It seems so obvious now... just not sure why it wasn't before. Wink


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.