[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] Howto AliasMatch?
- Subject: Re: [cobalt-users] Howto AliasMatch?
- From: flash22@xxxxxxx
- Date: Wed Nov 29 11:04:01 2000
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
On Mon, 27 Nov 2000, jspr wrote:
> I'm having a with a ton of pages that I could (almost) fix if could figure
> out how to make all pages on a site with the .htm suffix alias match to the
> same standard page (ie. web/htmerror.html). It must be possible to do
> something similar to the users dir alias but I'm lost in all the
> ([^/]+)(/(. stuff...
> How do I say /anywhere/any_file.htm = /home/sites/sitexx/web/save_my_ass.html
> *smiles*
> jspr
you can do this in .htaccess form a main site, here's 2 rules
#convert .htm to .html
RewriteEngine on
RewriteBase /
RewriteRule ^([^/]*)\.htm$ $1.html [L,R]
#convert .htm to error.html
RewriteEngine on
RewriteBase /
RewriteRule ^([^/]*)\.htm$ /error.html [L,R]
---
ok, the bad news, cobalt used an Alias to handle the ~user directories and
it breaks rewrite at the .htaccess level, if you want it to work there
you have to put slightly different rules in httpd.conf, and they have to
go before the ~user stuff