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
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.

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.