SV: [Mono-list] mod_mono and userdir

Steinar Herland
Wed, 12 Mar 2003 20:33:15 +0100

If it's HttpModule or an Apache module "doesn't matter". The request =
will have to be handled / rewritten on every request anyway.

I believe a HttpModule is preferred because it's a pure C# solution, and =
because of the simplicity:

if(Request.Path.IndexOf("~")>0){  //Use a RegEx here?
	//Do something


-----Opprinnelig melding-----
Fra: Eran Sandler []=20
Sendt: 12. mars 2003 16:17
Til: Daniel Lopez;
Emne: RE: [Mono-list] mod_mono and userdir

Hi Daniel,
You can write an HttpModule that upon initalization hooks to the =
BeginRequest event and it can parse the request URL and perform server =
redirect or directly write to the response.
I've done such things for different reasons (not the ones that you want) =
but you should bare in mind that on EVERY request that comes to that =
application it will pass through your module so except a decrease in =
I think you should try to resolve it at the apache module level. Perhaps =
by doing what I have suggested in my previous post (I'm not sure how to =
do that since I don't know Apache that well).
If you can redirect a request at the Apache=A0module level it seems like =
the most reasonable place to do that.
-----Original Message-----=20
From: Daniel Lopez []=20
Sent: =E3 12/03/2003 14:55=20
Subject: Re: [Mono-list] mod_mono and userdir

Yes, I already looked at the HttpApplication events and in the =
namespace and could not find a path resolve event? Should I be looking
somwehre else?
The current place I am thinking on hooking is in BeginRequest

> There is a event that is called during path resolve, that could =
resolve that
> path into another physical path (just change it). I don't have time to =
> a poc now but take a look in MSDN.
> Cheers,
>=A0 Patrik
> > -----Original Message-----
> > From: Daniel Lopez []
> > Sent: Wednesday, March 12, 2003 12:35 PM
> > To:
> > Subject: [Mono-list] mod_mono and userdir
> >
> >
> >
> > I believe part of what I want can be accomplished with
> >
> > HttpContext.RewritePath()
> >
> > Not currently implemented in Mono, I=B4ll look into implementing it.
> > This can then be called from an HttpModule
> >
> > Cheers
> >
> > Daniel
> > _______________________________________________
> > Mono-list maillist=A0 -=A0
> >
> >
Mono-list maillist=A0 -=A0