# Script Modify: Help

**URL:** <https://www.phphelp.com/t/script-modify-help/11105>\
**Category:** General PHP Help\
**Created:** [March 28, 2008, 1:27pm UTC](https://www.phphelp.com/t/script-modify-help/11105 "2008-03-28T13:27:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Radsan](https://www.phphelp.com/letter_avatar_proxy/v4/letter/r/a587f6/32.png) [@Radsan](https://www.phphelp.com/u/Radsan)\
**Post date:** [March 28, 2008, 1:27pm UTC](https://www.phphelp.com/t/script-modify-help/11105/1 "2008-03-28T13:27:46Z")

</div>

I have been helping a not for profit organisation to move servers and reinstate their bespoke PHP CMS website after the website creator/coder who also was hosting their site and administering it, deserted them.

The script is fully owned by the not for profit organisation. However some key files have been encrypted using Ion Cube. While the migration was largely successful, I am trying to resolve a niggly problem which refers to account paths within these encrypted files which is throwing up errors on certain functions.

What I want to do is add an htaccess file which prepends a little script to all php files within directories and sub directories in problem areas, that will replace the account paths on the script to the new account path:

for example replace /home/xxx/yyy with home/aaa/bbb before the script is compiled by the server.

I know what the old account path and the new account paths are but cannot work out the php required to do this to prepend to the encrypted file as I am very much a noob. I don’t know if this approach will work but, if implemented correctly, I don’t see any reason why it shouldn’t.

I would be grateful for any help.

---

<div class="post-metadata">

**Author:** ![hershal](https://www.phphelp.com/letter_avatar_proxy/v4/letter/h/ad7895/32.png) [@hershal](https://www.phphelp.com/u/hershal)\
**Post date:** [March 28, 2008, 9:47pm UTC](https://www.phphelp.com/t/script-modify-help/11105/2 "2008-03-28T21:47:31Z")

</div>

it should be easy just to add a htaccess file to the directory with something like this

```auto
Redirect /olddirectory/oldfile.php newdirectory/newfile.php
```

this means when ever the code looks for the old file it should be redirected to the new one

---

<div class="post-metadata">

**Author:** ![Radsan](https://www.phphelp.com/letter_avatar_proxy/v4/letter/r/a587f6/32.png) [@Radsan](https://www.phphelp.com/u/Radsan)\
**Post date:** [March 28, 2008, 9:51pm UTC](https://www.phphelp.com/t/script-modify-help/11105/3 "2008-03-28T21:51:20Z")

</div>

If I had a new file, I would have just replaced the existing one…

It’s a line of an encrypted script which is a function pointing to a fileupload location.

Different story altogether…Thanks for your help…
