redirect urls

S Ahmed sahmed1020 at gmail.com
Mon Oct 15 14:26:06 UTC 2012


So when nginx responds with a 301, is that an additional rountrip for the
user?

Could I somehow maintain the url for the client, but internally re-write it
to the updated url so my web application can handle it correctly?

On Mon, Oct 15, 2012 at 12:44 AM, Edho Arief <edho at myconan.net> wrote:

> On Mon, Oct 15, 2012 at 10:56 AM, S Ahmed <sahmed1020 at gmail.com> wrote:
> > I'm porting a .asp application over to something else, and I need to
> > re-write the following url pattern:
> >
> > www.example.com/posts/get_post.asp?post_id=123
> >
> > to
> >
> > www.example.com/posts/123
> >
>
> location = /posts/get_post.asp {
>   return 301 /posts/$arg_post_id;
> }
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20121015/5091dadf/attachment.html>


More information about the nginx mailing list