Welcome! Log In Create A New Profile

Advanced

Re: URI pattern baffling problem

February 08, 2011 09:20AM
On Tue, Feb 08, 2011 at 01:24:38PM +0000, António P. P. Almeida wrote:

> On 8 Fev 2011 13h11 WET, igor@sysoev.ru wrote:
>
> > On Tue, Feb 08, 2011 at 11:55:27AM +0100, Gregory Agerba wrote:
> >
> >> Thanks Antonio, now that worked.
> >
> > You should think not in negative way:
> >
> > if ($request_uri !~* "^/documents/(?:[A... ") { { rewrite ^
> > http://www.google.com/ permanent; }
> >
> > but in positive way:
> >
> > location ~* "^/documents/(?:[A... " {
> > ...
> > }
> >
> > location / { rewrite ^ http://www.google.com/ permanent; }
> >
>
> I agree. But the problem stems from the fact that most applications
> don't ever consider the configuration at the server or virtual host
> level. Apache has the directory context (.htaccess) so people tend to
> make their applications depend on it as much as possible and on the
> server or vhost config as little as possible.
>
> Since you cannot define locations in a directory context (.htaccess)
> the only solution is to think backwards and hack something revolving
> around mod_rewrite.
>
> It's a deeply rooted habit. It's not easy to make the transition to
> Nginx where there's no directory context, hence things must be thought
> out differently from the outset. But yes we should insist on changing
> that habit. Thinking backwards makes Nginx config feel strange and
> unnatural.

Any Apache-based application can be configured inside <Location> if
it can be configured via .htaccess.
The single reason why .htaccess is so popular is shared hosting.


--
Igor Sysoev
http://sysoev.ru/en/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

URI pattern baffling problem

Gregory February 07, 2011 09:48AM

Re: URI pattern baffling problem

vt February 07, 2011 09:54AM

Re: URI pattern baffling problem

Splitice February 07, 2011 10:10AM

Re: URI pattern baffling problem

Gregory Agerba February 07, 2011 10:14AM

Re: URI pattern baffling problem

vt February 08, 2011 03:58AM

Re: URI pattern baffling problem

Gregory Agerba February 08, 2011 04:44AM

Re: URI pattern baffling problem

António P. P. Almeida February 08, 2011 05:06AM

Re: URI pattern baffling problem

Gregory Agerba February 08, 2011 05:58AM

Re: URI pattern baffling problem

Igor Sysoev February 08, 2011 08:14AM

Re: URI pattern baffling problem

Gregory Agerba February 08, 2011 08:22AM

Re: URI pattern baffling problem

Igor Sysoev February 08, 2011 09:04AM

Re: URI pattern baffling problem

Gregory Agerba February 08, 2011 09:12AM

Re: URI pattern baffling problem

António P. P. Almeida February 08, 2011 08:32AM

Re: URI pattern baffling problem

Igor Sysoev February 08, 2011 09:20AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 133
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready