Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Cherokee: users

Feature request: File exists regular expression support

 

 

Cherokee users RSS feed   Index | Next | Previous | View Threaded


adam.woodbeck at gmail

Jan 22, 2010, 2:21 PM

Post #1 of 1 (225 views)
Permalink
Feature request: File exists regular expression support

I apologize if my feature request is already supported by the File
exists rule in Cherokee and I simply don't fully understand its
functionality. But what I would love to see is the ability of the
File exists rule to support regular expressions so static files can be
matched more dynamically. What I'm trying to do, which appears to be
unsupported by Cherokee, is replicate the following Nginx
functionality:

location / {
if (-f $request/index.html) {
rewrite (.*) $1/index.html break;
}
if (!-f $request) {
proxy_pass http://django;
break;
}
}

So for the request "http://domain.com/blog/" the above rules would
look for a "http://domain.com/blog/index.html" file. If it exists,
the request would be rewritten and the static file would be served.
Otherwise, the original request would be passed on to the proxy as
usual.

Alex was kind enough to hash this out with me a few days ago and he
reached the conclusion that what I was trying to do wasn't currently
supported by Cherokee. The whole point of my request is to support
django-staticgenerator
(http://superjared.com/projects/static-generator/) to reduce the
overhead on my site by serving up static files generated from dynamic
content. I am assuming that adding regular expression support to the
File exists rule will allow me to accomplish what I'm trying to do.

Adam
_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee

Cherokee users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.