Jump to content

.htaccess RewriteEngine question


micah1701

Recommended Posts

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

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.

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.