This entry was posted on Wednesday, June 10th, 2009 at 9:07 am and is filed under Web Space Programming. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.


My Space Proxy
Ultimate Web Space Tools for any Skill Level
When scripting, what is the directory format for a file on webspace?
I am currently setting up a script that will be running a certain program via my web space; I'm wanting to double-check the format in which I would direct the script to go to. Would it be "/yourdomain.com/dir/file.file", or something else? Please help!
You have 2 choices.
The full path: http://www.xxx.com/xxx/yyy/zzz.html
This will work anywhere.
The relative path: zzz.html
This will work if the file is in directory yyy
For example if all your files are in http://www.geocities.com/username
then you can use the path
http://www.geocities.com/username/xxx.html
or
xxx.html
The difference is keeping or omitting the http://
Relative names are best since if you move the entire web site you do not have to make any changes to the addresses.
One Response to “When scripting, what is the directory format for a file on webspace?”
Leave a Reply

June 10th, 2009 at 2:40 pm
You have 2 choices.
The full path: http://www.xxx.com/xxx/yyy/zzz.html
This will work anywhere.
The relative path: zzz.html
This will work if the file is in directory yyy
For example if all your files are in http://www.geocities.com/username
then you can use the path
http://www.geocities.com/username/xxx.html
or
xxx.html
The difference is keeping or omitting the http://
Relative names are best since if you move the entire web site you do not have to make any changes to the addresses.
References :