Welcome to WebmasterWorld Guest from 107.20.5.156

Forum Moderators: phranque

Message Too Old, No Replies

How do you find the root directory of your website?

need to install a script

     

htdawg

8:34 am on May 22, 2008 (gmt 0)

10+ Year Member



hi,
I found a script that i want to install but in the setup it asks for the root directory of my site e.g www/home/html how do I find out what it is?

Thanks

kaled

9:49 am on May 22, 2008 (gmt 0)

WebmasterWorld Senior Member kaled is a WebmasterWorld Top Contributor of All Time 10+ Year Member



It should be apparent if you view your site using FTP.

Type in ftp://yourdomain.com in your browser - most browsers provide a directory view even if they don't permit files to be uploaded. (In Vista, use Explorer not Internet Explorer.)

Kaled.

dreamcatcher

3:03 pm on May 22, 2008 (gmt 0)

WebmasterWorld Senior Member dreamcatcher is a WebmasterWorld Top Contributor of All Time 10+ Year Member



FTP (as mentioned by kaled) or via the File Manager in your server control panel.

dc

rocknbil

2:58 pm on May 24, 2008 (gmt 0)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member



The domain root can be varied depending on how the server is set up. The sure fire way: run this little script. :-) It will display all environment variables, including DOCUMENT_ROOT, which is what you're after.

Name it something like envars.cgi, upload it to your cgi executable directory, set the permissions to executable (755,) and be sure to remove it from your server when you're done - you don't want someone stumbling on it and getting information about your server environment.

#!/usr/bin/perl
print "content-type:text/html\n\n";
foreach $varname (sort keys %ENV) {
print "$varname $ENV{$varname}<br>\n";
}