Homepage is default despite me making a new one?
Posted by: cfaice (---.eriepa.dsl-w.verizon.net)
Date: April 27, 2006 08:57PM

Hi all,

I have wamp installed and I set the following in the .hpptd.conf.

ServerRoot "c:/wamp/apache2"

DocumentRoot "C:/wamp/www"

<Directory "C:/wamp/www">

and I saved my index.html in "C:/wamp/www" and I still get the default page instead of my homepage.

I restarted several times, and I don't see the issue.

Thanks in advance,

Don

Options: ReplyQuote
Re: Homepage is default despite me making a new one?
Posted by: CyberSpatium (---.hsd1.or.comcast.net)
Date: April 29, 2006 05:21AM

You are setting the wrong item to set index.html as your default page. You need to use the DirectoryIndex directive fror that. The DirectoryIndex directive sets the list of resources to look for, when the client requests an index of the directory by specifying a / at the end of the directory name. Local-url is the (%-encoded) URL of a document on the server relative to the requested directory; it is usually the name of a file in the directory. Several URLs may be given, in which case the server will return the first one that it finds. If none of the resources exist and the Indexes option is set, the server will generate its own listing of the directory.

Example

DirectoryIndex index.html index.htm index.php

When a request for [myserver] would return [myserver]. If there was not an index.html file in that directory, then Apache would use the next index file Directoryindex lists, index.htm. If there were no index.htm file in that directory, then it would go to the next index file DirectoryIndex list index.php. If no file is found, and there are no more items in the DirectoryIndex directive, then apache will generate its own listing of the directory.

If you look at your current httpd.conf file, your DirectoryIndex is setup like this:

DirectoryIndex index.php index.php3 index.html index.htm index.html.var

To make your index.html have priority over index.php, change it to:

DirectoryIndex index.html index.php index.php3 index.htm index.html.var

For the new settings to take effect, save the file and restart apache.

More info on DirectoryIndex
[httpd.apache.org]



Post Edited (04-29-06 05:24)

CyberSpatium
----------------------
WAMP Forum Admin

Web Development for Newbie's Blog - Check out my new blog. It is for web developers, and especially tailored for the web development newbie. If you are not fluent in “geek speak”, then this incredible resource is just you. And even if you are a web development pro, this is a great resource to check out some of the latest web development tips, news, tutorials, codes and more.

Options: ReplyQuote


Sorry, only registered users may post in this forum.