# Server\_name / redirect bug?

**URL:** <https://www.ruby-forum.com/t/server-name-redirect-bug/201231>\
**Category:** NGINX\
**Created:** [January 3, 2011, 12:40pm UTC](https://www.ruby-forum.com/t/server-name-redirect-bug/201231 "2011-01-03T12:40:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [January 3, 2011, 12:40pm UTC](https://www.ruby-forum.com/t/server-name-redirect-bug/201231/1 "2011-01-03T12:40:04Z")

</div>

i’m trying to create a virtualhost name [www2.mydomain.com](http://www2.mydomain.com)  
however when i tried to redirect the traffic, it seems that it has  
header  
Location : .mydomain.com

When I change my virtualhost into [www3.mydomain.com](http://www3.mydomain.com), it can be  
redirected very  
well.

Is this a bug?

---

<div class="post-metadata">

**Author:** ![Indo\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/ce7236/32.png) [@Indo\_P](https://www.ruby-forum.com/u/Indo_P)\
**Post date:** [January 3, 2011, 11:37pm UTC](https://www.ruby-forum.com/t/server-name-redirect-bug/201231/2 "2011-01-03T23:37:39Z")

</div>

Hello!

On Mon, Jan 03, 2011 at 03:38:38AM -0800, Indo P. wrote:

> i’m trying to create a virtualhost name [www2.mydomain.com](http://www2.mydomain.com)  
> however when i tried to redirect the traffic, it seems that it has header  
> Location : .mydomain.com
> 
> When I change my virtualhost into [www3.mydomain.com](http://www3.mydomain.com), it can be redirected very  
> well.
> 
> Is this a bug?

You may want to provide more info.

> **[GitHub - nginxinc/nginx-wiki: ARCHIVED -- Source for the now archived NGINX Wiki...](https://github.com/nginxinc/nginx-wiki)**
>
> ARCHIVED -- Source for the now archived NGINX Wiki section of https://www.nginx.com

Maxim D.
