Re: [users@httpd] rewrite module eliminate the of .html address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/11/05, Thomas J Berger <tberger@xxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux