Default file extension .html ?

Default file extension .html ?

Post by M.E. » Thu, 19 Jun 1997 04:00:00



Hi
I recently moved from the CERN-Server to Apache, and I'm very happy with
this decission. Anyway, I miss a few practical things that I didn't found
how to manage in Apache. The most urgent is the following one:
How can I set ".html" or ".htm" as the default extension for filenames that
are referenced on HTML-pages with the directive <a
href="/somewhere/filename"> ?
Some users forget regularly to write down the full filename with the .html
extension, and this was no problem under CERN, where you could define the
assumed extension by default if it was missing.
Many thanks in advance for every suggestion.

Manuel Elgorriaga

( Please reply also by e-mail if possible)

 
 
 

Default file extension .html ?

Post by Roberto Stellin » Fri, 20 Jun 1997 04:00:00



Quote:> Hi
> I recently moved from the CERN-Server to Apache, and I'm very happy with
> this decission. Anyway, I miss a few practical things that I didn't found
> how to manage in Apache. The most urgent is the following one:
> How can I set ".html" or ".htm" as the default extension for filenames th=
at
> are referenced on HTML-pages with the directive <a
> href=3D"/somewhere/filename"> ?
> Some users forget regularly to write down the full filename with the .htm=
l
> extension, and this was no problem under CERN, where you could define the
> assumed extension by default if it was missing.
> Many thanks in advance for every suggestion.

    Include the line:
DirectoryIndex index.html index.htm

    on your srm.conf file. This will do the trick.

    [[]],
    Stelling.

-------------------------------------+-----------------------------------
Roberto Stelling - Suporte AlterNex  | BookMarks=AE (http://www.bookmarks.c=
om.br)

eira
http://www.alternex.com.br/~stelling | Mais de 260.000 paginas indexadas

 
 
 

Default file extension .html ?

Post by Marc Slemk » Fri, 20 Jun 1997 04:00:00


[posted and mailed]

You can't really.  But you can add MultiViews to the relevant
Options directive to have Apache take a look at different extensions
when it can't find the file.


>Hi
>I recently moved from the CERN-Server to Apache, and I'm very happy with
>this decission. Anyway, I miss a few practical things that I didn't found
>how to manage in Apache. The most urgent is the following one:
>How can I set ".html" or ".htm" as the default extension for filenames that
>are referenced on HTML-pages with the directive <a
>href="/somewhere/filename"> ?
>Some users forget regularly to write down the full filename with the .html
>extension, and this was no problem under CERN, where you could define the
>assumed extension by default if it was missing.
>Many thanks in advance for every suggestion.
>Manuel Elgorriaga

>( Please reply also by e-mail if possible)

 
 
 

Default file extension .html ?

Post by Benarson Behajain » Fri, 27 Jun 1997 04:00:00



: > Hi
: > I recently moved from the CERN-Server to Apache, and I'm very happy
with
: > this decission. Anyway, I miss a few practical things that I didn't
found
: > how to manage in Apache. The most urgent is the following one:
: > How can I set ".html" or ".htm" as the default extension for
filenames th=
: at
: > are referenced on HTML-pages with the directive <a
: > href=3D"/somewhere/filename"> ?
This is the same question I sent here 2 months ago,  the answer is:
Use the MultiViews option in your access.conf
e.g (from my access.conf): Options Indexes Includes ExecCGI MultiViews

So if browsers send "GET /somewhere/filename" to your server,
then the server will send a file "filename" or "filename.*"
where * is an extension.
: > Some users forget regularly to write down the full filename with the
.htm=
: l
: > extension, and this was no problem under CERN, where you could
define the
: > assumed extension by default if it was missing.
: > Many thanks in advance for every suggestion.
:
:     Include the line:
: DirectoryIndex index.html index.htm
:     on your srm.conf file. This will do the trick.
No, this one tells that, any request without filename or ends with
"/" will be considered as "index.html" or "index.htm"

----------

P.S: You'll see more info about MultiVies in "Content Negotiation
Explained" from ApacheWeek HomePage