putting stupid search engine urls back

Gabriel Ramuglia gabe at vtunnel.com
Mon Aug 31 23:27:45 MSD 2009


yupp, that's right. It's a bit more complicated of a regex...

probably what you had before, but, with something like this at the end

(p([0-9]*))?\.html$

where we have one set of grouping symbols so we can have the ? at the
end, to make the match optional. so $2 is not needed, and $3 is your
page value.

On Mon, Aug 31, 2009 at 12:08 PM, AMP Admin<admin at ampprod.com> wrote:
> Hi again Gabriel,
>
> It would be
>
> guys-your-favorite-dji-t27822p2.html  -->  showthread.php?t=27822&page=2
>
> I guess anytime it finds pX it should go to &page=X ?
>
>
>
> Regards,
>
> -Team AMP
> http://www.ampprod.com
>
>
> -----Original Message-----
> From: owner-nginx at sysoev.ru [mailto:owner-nginx at sysoev.ru] On Behalf Of
> Gabriel Ramuglia
> Sent: Sunday, August 30, 2009 11:31 PM
> To: nginx at sysoev.ru
> Subject: Re: putting stupid search engine urls back
>
> what's the intended destination url formatting?
>
> On Sun, Aug 30, 2009 at 7:31 PM, AMP Admin<admin at ampprod.com> wrote:
>> Shoot guys... I'm back.
>>
>> I didn't think abt page 2,3, and so on. Check out the p2 on the following.
>> These aren't getting caught.
>>
>> guys-your-favorite-dji-t27822p2.html
>>
>> Regards,
>>
>> -Team AMP
>> http://www.ampprod.com
>>
>> -----Original Message-----
>> From: owner-nginx at sysoev.ru [mailto:owner-nginx at sysoev.ru] On Behalf Of
> AMP
>> Admin
>> Sent: Sunday, August 30, 2009 10:39 AM
>> To: nginx at sysoev.ru
>> Subject: RE: putting stupid search engine urls back
>>
>> I ended up getting it to work with just the following line.  No location
> or
>> anything.
>>
>> rewrite ^.*-t([0-9]+).html$ /showthread.php?t=$1 last;
>>
>> thanks everyone for your help!
>>
>>
>>
>>
>
>
>





More information about the nginx mailing list