cURL / Mailing Lists / curl-library / Single Mail


Re: Just starting to use libcurl, a question relating to DirectoryIndex in http servers...

From: Daniel Stenberg <>
Date: Thu, 3 Nov 2005 08:18:45 +0100 (CET)

On Thu, 3 Nov 2005, Leo Huf Campos Braga wrote:

> I have a problem here in my program relating to DirectoryIndex in http
> servers. If I send a domain as the url to the curl handle (like
>, is there any way for me to know the name of the
> file that the server has redirected me to with DirectoryIndex? In this case
> it is index.html, but sometimes it's index.asp, and it can actually be any
> file in the directory.

I assume you're talking about Apache here. Apache doesn't "redirect" you to
any specific file for "DirectoryIndex", it just checks for and uses a file by
default when a directory is requested.

The whole point with that action is to hide that information from the client
and there is simply no way libcurl can figure that out, as nothing besides
Apache itself can and will know that.


  Commercial curl and libcurl Technical Support:
Received on 2005-11-03