Monday, May 24, 2010

Question for web development?

can anybody help me to answer the following question?





"A browser user forms a URL with a schema and server name,but file name ,such as http://www.cnn.con/ .the web developer wants the file "home.html" to be served when no file is given.what must the developer or server administrator do to make this happen?"








thanks

Question for web development?
The web server itself specifies what pages will be searched for when no file is given.





Depending on the web server the options will vary. I'm running IIS and my system will look for the following files in this order:


Default.aspx


Default.htm


Default.asp


index.htm





This means if no file name is given it will look for those files at the root of the website.


If I added home.html to the bottom of the list, then the web developer would have to create a home.html in the root folder of his or her website. The root of the website would not be able to have the other files.





If I added home.html to the top of the list and the web developer had every file in the list in the root of the website, then the home.html file would be displayed since it's at the top of the list.
Reply:The administrator must reconfigure the webserver to return home.html by default, or also by changing the .htaccess file to return home.html by default.
Reply:If I'm not mistaken, the "home.html" file needs to be in the 'root' directory on the web server. The developer may need to contact the server administrator to find out which directory will be the root. Then, the developer puts the file in that directory (or folder), and creates other folders for the other content (best practices). Most web servers will look for the "index.htm" file by default.


No comments:

Post a Comment