[Mono-aspnet-list] How to map multiple hostnanames (foo.com, www.foo.com) to the same asp.net app in fastcgi-mono server

Daniel J. Summers daniel.summers.2415 at gmail.com
Sun May 8 09:54:57 EDT 2011


On Sat, May 7, 2011 at 8:00 AM, adrin <adrin84 at gmail.com> wrote:

> Hi,
> Is there a way to map www.foo.com and foo.com hostnames to the same
> asp.net
> application? I am using fastcgi-mono-server2.exe (on nginx)...

Is there a way to run both www.foo.com and foo.com as one ASP.NET app?
>

If they're the same app, you might be better off having nginx redirect one
to the other.  Here's what I use on my (lone remaining) nginx server to
enforce no-www URLs.

    # Enforce no WWW.
    if ($host = 'www.domain.com') {
        rewrite ^(.+)$  http://domain.com$1  permanent;
    }

-- 
*Daniel J. Summers*
*Owner, DJS Consulting*
E-mail <daniel.summers.2415 at gmail.com> • Website <http://djs-consulting.com>
 • Support <http://support.djs-consulting.com> • Tech
Blog<http://techblog.djs-consulting.com>

GEEKCODE 3.12 GCS/IT d s-:+ a C++ P--- L++ E--- W++ N++ o? K- w !O M--
V PS+ PE++ Y? PGP- t+ 5? X+ R* tv b+ DI++ D+ G- e<++ h---- r+++ y++++
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-aspnet-list/attachments/20110508/f142bce1/attachment.html 


More information about the Mono-aspnet-list mailing list