lancealigiannis Posted August 22, 2014 Share Posted August 22, 2014 (edited) hi all i'm trying to figure out how to change n include a hardcoded folder location with all its sub folders n files too.. eg.. fruitstore.com/greenfolder/apples changed to.. eg.. fruitstore.com/bluefolder/berries there r alot of references to this folder... so i'd wanna keep the fruitstore.com/greenfolder n have a php file in there redirecting to the new location.. then if ur really good... a folder on a different domain too.. eg.. fruitshop.com/bluefolder/berries u know how to do this? or know where to look for it?? thnx, lance. Edited August 22, 2014 by lancealigiannis Quote Link to comment Share on other sites More sharing options...
Ch0cu3r Posted August 23, 2014 Share Posted August 23, 2014 So you have changed the name of a folder and you want to redirect to the new folder name? You could handle this using mod_rewrite, a few examples You can also use mod_rewrite to redirect to your new domain too. Quote Link to comment Share on other sites More sharing options...
lancealigiannis Posted August 23, 2014 Author Share Posted August 23, 2014 thnnx for that... i haven't changed the name of the original folder... just placed its contents elsewhere... i'll check out the examples... ta. Quote Link to comment Share on other sites More sharing options...
lancealigiannis Posted August 24, 2014 Author Share Posted August 24, 2014 using some of them... all i got was a one way trip to a bad "require once" msg or sent to another domain... maybe php can include the files from another domain... but wat about just moving the files around different subdirectories... any more ideas? basically i'm trying to use the same site framework without 2 different site setups... Quote Link to comment Share on other sites More sharing options...
Ch0cu3r Posted August 24, 2014 Share Posted August 24, 2014 To be clear mod_rewrite has no effect on PHP. It only effects url requests to the server. basically i'm trying to use the same site framework without 2 different site setups... Sounds to me you'd be better of running your 2 sites under two separate virtual hosts. Virtual hosts allows you to server to host multiple sites from the same server. Each site can have its own domain and document root. You could then add your framework to a central location on the server and then add it to the include_path Quote Link to comment Share on other sites More sharing options...
lancealigiannis Posted August 25, 2014 Author Share Posted August 25, 2014 i c.. i'm using this code below to get a file from a location... n it works great.. but i'm not sure how to implement the get all folder structure however.. include_path=".:/newlocation/folders-n-files" <?php /** Absolute path to the config directory. */ if ( !defined('ABSPATH') ) define('ABSPATH', dirname(__FILE__) . '/'); /** Location of your config configuration. */ require_once(ABSPATH . '../config.php'); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.