Clarification of Placement of test website index/home page

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Clarification of Placement of test website index/home page

Postby StuartStein » 01. March 2012 14:38

I have followed he instructions of Andy Harris in his HTML, XHTML & CSS for Dummies (that's me), and changed the names of the php and html files in the htdocs folder from their original. I then pasted into that folder a page with the filename Index.htm.

According to Harris, when the URL localhost is entered after this, this should bring up the Index page-but it does not. Instead, as you probably all know, http://local host resolves to localhost/xampp. When I use the URLs localhost/index.htm and localhost I receive the message: 'The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.' Strangely, the <title> of the page appears in the Tab information. When I use the URLs localhost/xampp/index.htm and localhost/xampp/htdocs/index.htm I get the same message but without the <title> in the Tab information. Obviously I am doing something wrong.

I downloaded the zip version and it was installed on G:\xampp on a Windows VIsta Business 64 bit operating system.

Any help is appreciated and sorry about the elementary nature of the query.

Stuart Stein
StuartStein
 
Posts: 3
Joined: 01. March 2012 13:21
Operating System: Windows Vista Business 64bit

Re: Clarification of Placement of test website index/home pa

Postby JonB » 01. March 2012 15:43

I suggest you read the chapter(s) on Apache. If there are no chapters on that subject, find a book that does include them. There is Zero point in learning HTML, XHTML and CSS if you don't know how servers work. Its rather like learn how to build an automobile but not knowing about highways, rules of the road and maps. :mrgreen:

All webs servers (Apache, IIS and the rest) have directives or configuration options to tell the server what page(s) to serve, and in what order, when a Folder address (URL) is used rather than a Page URL.

http://httpd.apache.org/docs/2.2/mod/mo ... ctoryindex

Code: Select all
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
    DirectoryIndex index.php index.pl index.cgi index.asp index.shtml index.html index.htm \
                   default.php default.pl default.cgi default.asp default.shtml default.html default.htm \
                   home.php home.pl home.cgi home.asp home.shtml home.html home.htm
</IfModule>


Most Apache Directives are found in the Apache .conf files in \xampp\apache\conf and \xampp\apache\conf\extra. That entry is in the main file - \xampp\apache\conf\httpd.conf . Many directives can also be placed in .htaccess files, a very common practice that lets you 'fine grain' your controls.

bookmark that Apache Docs page, it will be invaluable.

Good Luck
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Clarification of Placement of test website index/home pa

Postby StuartStein » 01. March 2012 16:14

Whilst I appreciate your taking the time to reply, I do not appreciate your extreme arrogance, manifested in the posting of a green smiley, and comments about Zero points on HTML, XHTML and CSS, car mechanics and road routes. I know of no connection between the ability to write html and knowing where to place an index page on an Apache server; I have been writing html, etc. pages probably long before you ever got your hands on a playstation, as well as navigating around the world using mechanical road devices. I have absolutely no desire to become an expert on Apache or other servers, which no doubt for someone who has posted 2000+ messages in this forum must be galling; I just want to use it temporarily as a test bed. All I asked for was the answer to a very simple question: where does the index page/root directory for a website go, and I don't need a dressing down megillah in reply. I followed the instructions of someone who implied that they knew what they were talking about, and when this did not work, I asked for some clarification. Obviously this forum is different from many others.
StuartStein
 
Posts: 3
Joined: 01. March 2012 13:21
Operating System: Windows Vista Business 64bit

Re: Clarification of Placement of test website index/home pa

Postby hackattack142 » 01. March 2012 17:53

1. It depends on what you are trying to accomplish. Through the various configuration files and mechanisms like vhosts, it could really be placed anywhere as long as the configuration is adjusted accordingly. The default document root is /xampp/htdocs
2. By default, if you access http://localhost, the index.php in the /xampp/htdoc folder will be used and will redirect it to the http://localhost/xampp. Moving or renaming that file should stop the automatic redirection
3. By default, you should be able to access http://localhost/index.html and get a page that says "It Works!"

If accessing the default index.html file at http://localhost/index.html works, i would double check your custom HTML file for errors.
XAMPP Control Panel Developer
Latest CP: viewtopic.php?f=16&t=48932
hackattack142
 
Posts: 703
Joined: 20. May 2011 23:29
Operating System: Windows 7 Ultimate SP1 64-Bit

Re: Clarification of Placement of test website index/home pa

Postby StuartStein » 01. March 2012 19:34

Thanks to hackattack 142 for your reply.
StuartStein
 
Posts: 3
Joined: 01. March 2012 13:21
Operating System: Windows Vista Business 64bit


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 42 guests

cron