I’d like to make it redirect visitors from
http://www.my_domain.com/forum (note: there’s no trailing slash),
http://www.my_domain.com/forum/, http://www.my_domain.com/forums (again,
there’s no trailing slash here), http://www.my_domain.com/forums/,
http://www.my_domain.com/board (…yep) and
http://www.my_domain.com/board/ to http://forum.my_domain.com/. Neither
the path (except “forum”/“forums”/“board”) nor the query (if there’s
one) should get cut off. It’s working so far, but it also redirects
visitors from ex. http://www.my_domain.com/forumfoobar/, which isn’t
what I want.
On Fri, Mar 11, 2011 at 10:01:03AM -0500, strike wrote:
http://www.my_domain.com/forum (note: there’s no trailing slash),
http://www.my_domain.com/forum/, http://www.my_domain.com/forums (again,
there’s no trailing slash here), http://www.my_domain.com/forums/,
http://www.my_domain.com/board (…yep) and
http://www.my_domain.com/board/ to http://forum.my_domain.com/. Neither
the path (except “forum”/“forums”/“board”) nor the query (if there’s
one) should get cut off. It’s working so far, but it also redirects
visitors from ex. http://www.my_domain.com/forumfoobar/, which isn’t
what I want.
But recommended way is to avoid regexp-based solutions without
real need. It’s much simplier and much more scalable to write
configuration with normal static locations, i.e.
thank you guys and thanks a bunch for the explanation!
I’ll stick to what Maxim suggested, because it will definitively save me
from headaches. But it’s good to have the explanation and so to
understand what the problem was as the syntax looks like fundamental
knowledge to me.
Wow, even the creator himself spent some of his very spare time in
writing a reply.
Thanks again!
Posted at Nginx Forum:
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.