I think I’ve tried all different approaches for this, but here is the
problem: I need to separate all URLs starting with ‘/?’ from the
remaining ones (eg /?p=12).
I’ve tried a bunch of different regex matches, but none of them seems to
be able to match URLs starting with a ‘?’. I already started a thread
here (Redirect certain GET variables), but Jim referred me over
to the mailing list.
I think I’ve tried all different approaches for this, but here is the problem: I need to separate all URLs starting with ‘/?’ from the remaining ones (eg /?p=12).
I’ve tried a bunch of different regex matches, but none of them seems to be able to match URLs starting with a ‘?’. I already started a thread here (Redirect certain GET variables), but Jim referred me over to the mailing list.
The above regexes should match the request, but for some reason they don’t. Could anyone please provide me with a solution here?
That’s because Nginx doesn’t match locations on the query string. I
think you are most likely approaching this wrong anyway. Judging from
the little you’ve described, my guess is that you need to proxy any
request that can’t be mapped directly to an actual file:
Thanks for taking the time to answer my post. Unfortunately that didn’t
do the trick.
Let me try to explain the situation a bit better. I’m using Nginx as a
load balancer to proxy two different apps sitting on the same domain:
one Django app and one wordpress blog. I want to proxy ‘/’ and
‘/folder1’ to the django server and /?.* as well as everything else to
the wordpress server.
However, what would make a lot more sense is to setup wordpress as
either a subdomain or under /blog or something. Then you could just
have a separate server section or location.
Regards,
Cliff
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.