Re: [Pi3web-users] External redirection
Brought to you by:
zimpel
From: <zi...@t-...> - 2004-02-26 07:02:10
|
Hello Dharmesh, external redirection can be done in several different ways : - by embedding the related tag in a (static) HTML page (this is a pure browser mechanism, the server isn't involved at all), e.g.: <head> <meta http-equiv="refresh" content="0; URL=http://foo.org/bar/"> </head> - in Pi3Web 2.0.2 using the Redirection PathMapper (administration), this results, e.g., in the following configuration directive : Mapping RedirectMapper From="/pi3site/" \ To="http://pi3web.sourceforge.net/" - in the configuration by adding a flexible handler, which (conditionally) adds the correct response header in order to trigger redirection (configuration). - using one of the available features to generate dynamic contents, e.g. CGI, SSI, PHP, ISAPI, ASP, Servlet, JSP, PSP (programming), e.g. as PHP page : <? header("Location: http://foo.org/bar"); ?> Some Remarks : In each case, the response of the server should look like : HTTP/1.0 302 Permanently Moved NL Location: http://foo.org/bar NL NL NL - 'NL' indicates a new line. You must not care about it, if the headers are generated by the respective server functions (exception: NPH-CGI programs - i.e. 'Non Parsed Headers', these are produced by CGI's, which write the complete response message, including the status line and all headers into the output stream). - The URL to which the browser shall be re-located must be complete, because the redirection is done by the browser and not within the server ( schema://[host.]domain.extension/path[/resource?params] ) -- regards, Holger Dharmesh Shah schrieb: > > Hello Holger, > > Thanks for the feedback. > I will explore using - SF_NOTIFY_PREPROC_HEADERS. > Any hints/leads for external (via the browser, location of the target > e.g. at another web server) redirect. > > Thanks, > > Dharmesh > > ----Original Message Follows---- > From: zi...@t-... (Holger Zimmermann) > To: Dharmesh Shah <for...@ho...> > CC: pi3...@li... > Subject: Re: [Pi3web-users] Help on ISAPI Filter for SF_NOTIFY_URL_NOTIFY > Date: Wed, 25 Feb 2004 19:44:41 +0100 > > Hello Dharmesh, > > do you want to perform an internal (URL with physical location of the > target within the server) or an external (via the browser, location of > the target e.g. at another web server) redirect? For the first case > refer to this link: http://www.codeproject.com/isapi/isapiredirector.asp > > In this MFC-example they catch SF_NOTIFY_PREPROC_HEADERS events and > simply change the URL. This is done, before the server processes the > headers, i.e. maps the URL to a physical resource path. > > (I don't know, if the following is necessary, but in order to get > SF_NOTIFY_URL_MAP events you must invoke the filter DLL prior the > Pi3Web handler object, which completes the mapping phase, this is per > default the 'Start' object. Or you must supress the completion of the > 'Mapping' phase by the handlers invoked prior the filter. > This is the way, how Pi3Web handles processing of the separate request > phases: Each handler configured in the server logic object will be > called, until one sets the status of the processing of the phase to > 'completed'.) > -- > regards, > Holger > > Dharmesh Shah schrieb: > >> Hello, >> >> I have been struggling for past one day to setup features.pi3 to work >> with my custom ISAPI filter. >> >> I have been successfuly in getting filter events for >> SF_NOTIFY_PREPROC_HEADERS. >> >> But have not succeeded in getting SF_NOTIFY_URL_MAP events. >> >> What I need to do is redirect the request to different page >> (different URL) in selected cases. >> >> Help on this will be greatly appreciated. >> >> Thanks, >> >> Dharmesh >> >> _________________________________________________________________ >> INDIA TODAY @ Rs. 5 + a free gift ! >> http://www.indiatoday.com/itoday/intlsubscription/itsubs/it_offer.html >> Subcribe Now ... >> >> >> >> ------------------------------------------------------- >> SF.Net is sponsored by: Speed Start Your Linux Apps Now. >> Build and deploy apps & Web services for Linux with >> a free DVD software kit from IBM. Click Now! >> http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click >> _______________________________________________ >> Pi3web-users mailing list >> Pi3...@li... >> https://lists.sourceforge.net/lists/listinfo/pi3web-users >> > > _________________________________________________________________ > INDIA TODAY @ Rs. 5 for 5 years ! > http://www.indiatoday.com/itoday/intlsubscription/itsubs/it_offer.html > Subcribe Now ... > > > > ------------------------------------------------------- > SF.Net is sponsored by: Speed Start Your Linux Apps Now. > Build and deploy apps & Web services for Linux with > a free DVD software kit from IBM. Click Now! > http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click > _______________________________________________ > Pi3web-users mailing list > Pi3...@li... > https://lists.sourceforge.net/lists/listinfo/pi3web-users > |