
Question by barry_ucl: How to organize web pages on a remote host in a coherent manner?
I am a beginning programmer learning how to build web pages. I have written codes for a website that I have built but I don’t know how to organize them in a coherent manner on the remote host. For example, how do I ensure that one of my web pages function as the default front page of my website and link that front page to my domain name? I am trying to do this without a CMS like CMS made easy as I need to learn how the whole thing works. Could anyone help me? Thanks!
Best answer:
Answer by Jonathan C
To get a webpage to be the default page when a user comes to your site, save it as index.html in the main folder (usually public_html). If the page is a dynamic webpage, such as one that is programmed using PHP or ASP, save the file as index.php (or index.asp) and do not have a page named index.html in the main directory. By default the server will look for index.html first, and if it doesn’t find it, will keep looking in the main directory until it finds an index.something file. If there is not index file, it will probably just print out a list of files on the server, although the behavior depends on how the server is configured.
The best way to organize your files in a coherent manner is to start by putting all images in /images folder (where the “/” stands for the main folder — again, usually public_html). Then group your dynamic files into folders that accurately describe the files that they contain. I would suggest atleast installing a CMS and seeing how it’s folders and files are grouped. That should give you a pretty good idea of how web developers like to keep things organized.
Give your answer to this question below!



Question by barry_ucl: How to organize web pages on a remote host in a coherent manner?
I am a beginning programmer learning how to build web pages. I have written codes for a website that I have built but I don’t know how to organize them in a coherent manner on the remote host. For example, how do I ensure that one of my web pages function as the default front page of my website and link that front page to my domain name? I am trying to do this without a CMS like CMS made easy as I need to learn how the whole thing works. Could anyone help me? Thanks!
Best answer:
Answer by Jonathan C
To get a webpage to be the default page when a user comes to your site, save it as index.html in the main folder (usually public_html). If the page is a dynamic webpage, such as one that is programmed using PHP or ASP, save the file as index.php (or index.asp) and do not have a page named index.html in the main directory. By default the server will look for index.html first, and if it doesn’t find it, will keep looking in the main directory until it finds an index.something file. If there is not index file, it will probably just print out a list of files on the server, although the behavior depends on how the server is configured.
The best way to organize your files in a coherent manner is to start by putting all images in /images folder (where the “/” stands for the main folder — again, usually public_html). Then group your dynamic files into folders that accurately describe the files that they contain. I would suggest atleast installing a CMS and seeing how it’s folders and files are grouped. That should give you a pretty good idea of how web developers like to keep things organized.
Know better? Leave your own answer in the comments!



No comments:
Post a Comment