httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <jsl...@gmail.com>
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 <tberger@thermoweb.com> wrote:
> I would like to eliminate my user from having to type ".html" at the each
> web page
>
>  www.thermoweb.com/edgebanding.html to www.thermoweb.com/edgebanding
>
> 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.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message