httpd-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Malo ...@perlig.de>
Subject Re: Auto-docs rewrite
Date Sat, 23 Jul 2005 21:14:35 GMT
* Mads Toftum wrote:

> On Thu, Jul 21, 2005 at 12:40:13PM +0200, Rich Bowen wrote:
> > Config:
> >
> > RewriteMap directive2url \
> >    dbm:/www/vhosts/drbacchus/fajita/scripts/rewritemap.txt
> > RewriteMap tolower int:tolower
> >
> > RewriteCond %{REQUEST_URI} !^/(index.html)?$
> > RewriteCond %{REQUEST_URI} !^/(urls|to|be|excluded)
> > RewriteCond %{REQUEST_FILENAME} !-f
> > RewriteCond %{REQUEST_FILENAME} !-d
> > RewriteRule ^/([^/]*)$ \
> >   ${directive2url:${tolower:$1}|http://httpd.apache.org/docs-2.0}
> > [NE,R,L]
>
> I'm not too thrilled about this idea, because I think it would be a real
> performace killer. AFAIK ajax is more than busy enough as it is, it
> doesn't need more to do. If you really want to go through with this,
> then make it a lot simpler to get rid of the -d and -f.

How about the following when using the generated map I've just committed to 
trunk/docs/manual.

RewriteEngine On
RewriteMap tolower int:tolower
RewriteMap dir2url txt:/path/to/convenience.map

RewriteCond ${dir2url:${tolower:$1}} (.+)
RewriteRule ^/+docs/+([^/]+)$ /docs/2.0/%1 [R=301,NE,L]

I'm not sure how and when to convert to dbm, though (possibly 
automatically). Ideas?

nd
-- 
"Solides und umfangreiches Buch"
                                          -- aus einer Rezension

<http://pub.perlig.de/books.html#apache2>

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Mime
View raw message