Page 1 of 1

Doc Root Rewrite

Posted: Fri Mar 21, 2008 10:34 pm
by tecktalkcm0391
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!

Re: Doc Root Rewrite

Posted: Fri Mar 21, 2008 10:39 pm
by John Cartwright
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';

Re: Doc Root Rewrite

Posted: Fri Mar 21, 2008 11:48 pm
by tecktalkcm0391
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...

Re: Doc Root Rewrite

Posted: Sat Mar 22, 2008 12:19 am
by John Cartwright
Where exactly then?