Is there a way for me to "rewrite" the document root, because right now I have some long thing that makes no sense from my host /home/sjflkadf/server92848594/ajdlkf/84995/asjdfdi93/site.com/ is there a way for me to mask it so I only need to type /homedir/ for php codes and apache .htaccess files?
Thanks!
Doc Root Rewrite
Moderator: General Moderators
- tecktalkcm0391
- DevNet Resident
- Posts: 1030
- Joined: Fri May 26, 2006 9:25 am
- Location: Florida
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: Doc Root Rewrite
One would typically use a constant or other configuration variable. I.e.
Code: Select all
define('DOC_ROOT', $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR);
echo DOC_ROOT . 'index.php';- tecktalkcm0391
- DevNet Resident
- Posts: 1030
- Joined: Fri May 26, 2006 9:25 am
- Location: Florida
Re: Doc Root Rewrite
ok, so no way to do it in apache because I have some lines in it that I have to type that giant string, its not just in PHP...
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: Doc Root Rewrite
Where exactly then?