[Mono-list] mod-mono directoryindex with SetHandler mono

Robert Jordan robertj at gmx.net
Fri Apr 27 10:31:10 EDT 2007


Adriaan van Kekem wrote:
> Search:
> Hi,
> 
> I am using the statement SetHandler mono in my apache configuration to make
> sure all files are handled by mono itself. But now i have multiple
> virtualhosts, say a.test.com and b.test.com. Apache can handle them both
> with different virtualhost.
> Now, i want to set the index on both virtualhost to different destinations.
> so a.test.com has to go to /login.apsx?project=a and b.test.com has to go to
> /login.aspx?project=b. How can i configure this?
> 
> One note is that i am using forms authentication in my web.config, so that
> is redirecting too, with loginurl="login.aspx", but the bad thing with this
> is that login.aspx dont know whats the virtualhost name

The host name of the vhost can be obtained from
HttpRequest.ServerVariables, e.g.:

if (Request.ServerVariables["HTTP_HOST"] == "a.test.com") ...

Robert



More information about the Mono-list mailing list