Dnia 2009-12-16, śro o godzinie 00:15 +0100, Willy Tarreau pisze:
> On Tue, Dec 15, 2009 at 05:47:49PM -0500, Ken Roe wrote:
> > We are trying to make application URLs friendly using rewrite rules.
> > The goal is to eliminate the context path of the web application from
> > the url.
> > Example:
> > The URL http://app.company.com should rewrite to
> > http://backend:8080/app.
> This is a very bad idea, and while it may work in the short term,
> you will end up with permanent issues such as erroneously built
> resource paths (images, JS, CSS, ...), bad paths on cookies, bad
> redirection URLs, or the need to explicitly state a full path with
> a host name in each Location header with the need to rewrite it at
> every stage of your architecture, etc... I regularly see setups
> making use of rewrite rules for this same purpose. The only thing
> they can say after a few years of permanent degradation and workarounds
> involving hundreds of unmaintainable rewrite rules is always the same :
> "it's too late now to remove that crap, we have to live with it".
> So... better think twice before digging your hole.
> > Is there a way to do this using rewrite rules?
> This specific one above cannot because you have to take one part
> from the Host header and inject it into the request line. But those
> which only move components within the same line do work (eg: rewriting
> the host or rewriting the URI).
as for rewrites, what u really want is you app supporting that kind of address, like Willy said, those are only ugly workarounds
-- Mariusz Gronczewski (XANi) <xani666#gmail.com> GnuPG: 0xEA8ACE64 http://devrandom.plReceived on 2009/12/16 13:56
- application/pgp-signature attachment: To jest część wiadomości podpisana cyfrowo
This archive was generated by hypermail 2.2.0 : 2009/12/16 14:00 CET