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

Robert Jordan robertj at gmx.net
Wed May 9 05:44:13 EDT 2007


Adriaan van Kekem wrote:
> ok, so its not possible to use apache redirect based on virtualhosts in
> combination with SetHandler mono?

Of course you can. It's just a matter of setting the proper
rewrite rule:

http://httpd.apache.org/docs/2.0/misc/rewriteguide.html ;-)

Handling Request.ServerVariables["HTTP_HOST"] in your login.aspx
is far more portable and easier to implement.

Robert

> 
> 
> Robert Jordan wrote:
>> 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
>>
>> _______________________________________________
>> Mono-list maillist  -  Mono-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-list
>>
>>
> 



More information about the Mono-list mailing list