Why use the rewrite?

8 views
Skip to first unread message

luke.chambers

unread,
Jul 23, 2008, 2:01:01 PM7/23/08
to jiffy-web
I am curious as to why it is suggested to use a RewriteRule to
rewrite /rx to /static/rx.txt?

Also, instead of returning an empty file, would it not be beneficial
(performance wise) to simply return a HTTP 204 "No Content"?

Thanks!

Scott Ruthfield

unread,
Jul 23, 2008, 4:49:25 PM7/23/08
to jiff...@googlegroups.com
We've talked about moving the 200s to 204s - I can't think of any reason not to do so.

Devin Ben-Hur

unread,
Jul 23, 2008, 4:53:20 PM7/23/08
to jiff...@googlegroups.com

Well, it seems like a good idea (though the overhead to stat one file
and add an empty message body is pretty trivial). 204 is a relatively
unused HTTP status code, do you know how well it's accommodated across
the range of browsers?

I suspect nobody thought of it in the rush to get everything working, or
didn't realize it was possible to use Redirect to specify a 204 status
without a target URL (It's actually a fairly obscure reference in the
apache docs).

We'll try and test that config, and if it doesn't cause any problems
with our browser regression we'll update the suggested config (and fix
the ingestor to not reject the non-200 status code).

-Devin

luke.chambers

unread,
Jul 23, 2008, 5:04:58 PM7/23/08
to jiffy-web
Sounds good. I'm still curious as to the purpose of the rewrite. Is it
simply b/c you didn't want rx.txt in the root?

Luke

On Jul 23, 1:49 pm, "Scott Ruthfield" <scot...@gmail.com> wrote:
> We've talked about moving the 200s to 204s - I can't think of any reason not
> to do so.
>
> On Wed, Jul 23, 2008 at 11:01 AM, luke.chambers <lukechambe...@gmail.com>

Devin Ben-Hur

unread,
Jul 23, 2008, 5:25:32 PM7/23/08
to jiff...@googlegroups.com
luke.chambers wrote:
> Sounds good. I'm still curious as to the purpose of the rewrite. Is it
> simply b/c you didn't want rx.txt in the root?

Yep, all our static assets come from a child of /static. We wanted the
logging uri to be short, but we don't put any real documents in the root.

The http config file is just an example, you are expected to adapt it to
your own server particulars.

-Devin

Reply all
Reply to author
Forward
0 new messages