httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <>
Subject Re: [users@httpd] rewrite module eliminate the of .html address
Date Fri, 11 Nov 2005 17:15:30 GMT
On 11/11/05, Thomas J Berger <> wrote:
> I would like to eliminate my user from having to type ".html" at the each
> web page
> to
> How do I code this in the htaccess file.

One simple way is
Options +MultiViews
(See also the MultiViewsMatch directive).

Otherwise, you need to do something like
RewriteEngine On
RewriteRule ^([^.]*[^/])$ $1\.html
which should grab any request that does not have a "." in it and that
does not end in a slash and tack .html on the end.  You may also need
a RewriteBase in there depending on how things are setup.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message