micah1701 Posted September 9, 2009 Share Posted September 9, 2009 I know how to do simple redirects with .htaccess but I have a slightly more complicated problem. I have a several different pages of code from a client. Each page includes() other pages of code but those urls are coded coded into the application. example: <?php include_once($_SERVER['DOCUMENT_ROOT'].'/clients_subfolder/another_folder/some_php_code.php'); ?> I need to work on this code on my own server but am running my scripts, for obvious reasons, in a differnt folder path. Is there an easy way using .htaccess to "trick" all the existing code to look for the include files using my existing structure, instead of what's harded coded? ie, the page /my/site/index.php looks to include the previously show file but the file really resides at /my/site/some_php_code.php thanks! Link to comment https://forums.phpfreaks.com/topic/173617-htaccess-rewriteengine-question/ Share on other sites More sharing options...
trq Posted September 9, 2009 Share Posted September 9, 2009 You should setup an apache vhost for each client you work on not just load the client code into a sub directory, this however has nothing to do with php. Link to comment https://forums.phpfreaks.com/topic/173617-htaccess-rewriteengine-question/#findComment-915154 Share on other sites More sharing options...
micah1701 Posted September 9, 2009 Author Share Posted September 9, 2009 thanks for once again padding your post count while giving absolutely no help whatsoever. I realize this is a PHP forum but it seem'd like a fairly simple question and I thought someone could help - since I've received and given much help through this site in the past. Link to comment https://forums.phpfreaks.com/topic/173617-htaccess-rewriteengine-question/#findComment-915156 Share on other sites More sharing options...
trq Posted September 9, 2009 Share Posted September 9, 2009 You are aware that there is an Apache board located here? Oh, and I thought informing you of apache vhosts was help enough. Link to comment https://forums.phpfreaks.com/topic/173617-htaccess-rewriteengine-question/#findComment-915157 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.