March 18, 2009 03:55PM
On Wed, Mar 18, 2009 at 12:33:15PM -0700, mike wrote:

> well, i did it this way, and it seems to work...
>
> rewrite ^/sites/foo/index.php$ http://foo.com/ permanent;
> rewrite ^/sites/coolsw(|/)$ http://foo.com/ permanent;
>
> # kill it from search engines
> rewrite ^/sites/foo/(.*)$ /kill last;
> location /kill {
> return 404;
> }

However, it's better to runs these rewrites under

location /sites/foo/ {
rewrite ^/sites/foo/index.php$ http://foo.com/ permanent;
return 404;
}

location /sites/coolsw {
rewrite ^/sites/coolsw(|/)$ http://foo.com/ permanent;
}

> 2009/3/18 Igor Sysoev <is@rambler-co.ru>:
> > On Wed, Mar 18, 2009 at 12:06:36PM -0700, mike wrote:
> >
> >> rewrites happen before location {} blocks are considered (if the
> >> rewrite is on a global level) correct?
> >>
> >> so
> >>
> >> location /foo {
> >>
Subject Author Posted

Quick question

mike March 18, 2009 03:34PM

Re: Quick question

Igor Sysoev March 18, 2009 03:35PM

Re: Quick question

mike March 18, 2009 03:53PM

Re: Quick question

Igor Sysoev March 18, 2009 03:55PM

Re: Quick question

mike March 18, 2009 04:05PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 317
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready