You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cli-users@httpd.apache.org by Juergen JG Goldmann <Go...@reimelt.de> on 2004/12/01 16:41:20 UTC
Subscription to mailing list - bug for Response.Redirect
Testing the mod_aspdotnet module 2.0.0 we have a problem with the following
construct:
in "global.asax"
we have a handler :
protected void Application_BeginRequest(Object sender, EventArgs e)
{
string sPath = Request.Path.ToLower(); // in Example
/testpage/recipe.aspx
int iStart = sPath.LastIndexOf("/") + 1;
string sPage = sPath.Substring(iStart, sPath.IndexOf(".aspx") -
iStart);
string newPage;
if (sPage == "recipe")
{
newPage = "/testpage/redirectpage.aspx?page=recipe";
Context.RewritePath( newPage); // does not work
!!
// Context.Response.Redirect(NewPage); // even this does not work !
}
}
this worked fine with IIS but with Apache (2.0.52) we get the following
error ( in the Browser)
" The requested URL /testpage/recipe.aspx was not found on this server. "
It lookes like the "Context.RewritePath" or "Context.Response.Redirect"
does not work.
If I call the URL direct it was shown in the browser.
We try to fix this with "RedirectMatch" in httpd.conf - this works!!
... but the above handler is only a simle example, our real handler has
quite more programatical logic and we could not put this logic into the
apache configuration-file.
I hope someone from the developer-team could help us.
with kind regards
mit freundlichen Grüßen
Reimelt GmbH
i.A. Jürgen Goldmann
Software / Elektronik (ETS)
Messenhäuser Straße 37-39
D-63322 Rödermark
Tel:+49(0)6074/691-164
Fax:+49(0)6074/691-261
e-mail:goldmann.juergen@reimelt.de
--------------> wichtiger Hinweis <---------
Aufgrund unseres eingehenden e-mail Filters ist folgende Handhabung bei
Datei-Anhängen nötig.
e-mail Anhänge mit der Datei-Endung: "exe" oder "dll" müssen in die
Datei-Endung "sav" umbenannt und danach gezippt werden.
RE: Subscription to mailing list - bug for Response.Redirect
Posted by Yussef Alkhamrichi <ya...@hotmail.com>.
>this worked fine with IIS but with Apache (2.0.52) we get the following
>error ( in the Browser)
>
>" The requested URL /testpage/recipe.aspx was not found on this server. "
>
>It lookes like the "Context.RewritePath" or "Context.Response.Redirect"
>does not work.
Just one tip if have encountered a couple of times: Apache is case
sensitive, thus '/testpage/recipe.aspx' must match in casing with the folder
and file name (IIS doesn't care about this).
Yussef
_________________________________________________________________
Talk with your online friends with MSN Messenger http://messenger.msn.nl/