Forum Moderators: phranque

Message Too Old, No Replies

URL completion / default documents in Apache

         

Will_H

10:57 am on Jul 12, 2004 (gmt 0)

10+ Year Member



I have installed Apache 1.3.31 on a Windows XP host and am in the process of setting up URL rewriting.

I am seeing some behaviour which I find confusing. When I enter a URL such as "http://localhost/index" into my browser, the server is returning the document "index.xml" from the folder listed in my DocumentRoot directive in httpd.conf.

Is this expected? It is causing me a few problems, because the following rule in .htaccess:

RewriteRule ^index$ /another_page.html

does not do anything when the aboe URL is entered into the browser. In order to get it to work I have to use this rule instead:

RewriteRule ^index\.xml$ /another_page.html

This matches when "http://localhost/index" is requested in the browser, but is counter intuitive.

Is this normal behaviour for Apache? I've not really been using it long enough to tell, but it seems odd that Apache should serve "index.xml" when I have asked for "index".

I thought maybe "index.xml" might be included in the list of default documents, but in httpd.conf, the "DirectoryIndex" has not been altered, i.e. it reads "DirectoryIndex index.html".

Help!

gergoe

3:10 pm on Jul 12, 2004 (gmt 0)

10+ Year Member



This is not really normal, except if you explicitly configured to happen (rewriting/redirection). What shows up in the logs for such a request?

Will_H

4:49 pm on Jul 12, 2004 (gmt 0)

10+ Year Member



gergoe, thanks for replying. the corresponding entry in access.log is as follows:

127.0.0.1 - - [12/Jul/2004:10:26:44 +0100] "GET /common/products HTTP/1.1" 200 2208

py9jmas

4:54 pm on Jul 12, 2004 (gmt 0)

10+ Year Member



It's content negotiation with multiviews.
[httpd.apache.org...]

Skitso

5:55 pm on Jul 12, 2004 (gmt 0)

10+ Year Member



I just wrote a post a few hours back and I found I was having the same problem. However, I did not turn multiviews on, nor are they on in my .htaccess. It appears multiviews came enabled (because I didn't turn it on!) by default with my installation of apache/php/perl/mysql by AppServ (free).

Will_H

7:53 am on Jul 13, 2004 (gmt 0)

10+ Year Member



Thanks for the help everyone, switching off MultiViews did the trick.