简体   繁体   English

Response.Redirect传递ISAPI_Rewrite引擎

[英]Response.Redirect passes the ISAPI_Rewrite engine

*I use ISAPI_Rewrite v2 *我使用ISAPI_Rewrite v2

Hi, So I implement ISAPI_Rewrite on my site. 嗨,我在网站上实现了ISAPI_Rewrite。 Now i put on my pages a Response.Redirect But as it seems the redirect passes the ISAPI engine.. ie I see the new url but the rule doesnt apply. 现在,我在页面上放置了Response.Redirect,但似乎重定向通过了ISAPI引擎。即,我看到了新的url,但该规则不适用。

for example i enter this: example.com/SomePage.aspx 例如,我输入以下内容:example.com/SomePage.aspx

in SomePage.aspx.cs - PageLoad function theres: 在SomePage.aspx.cs-PageLoad函数中:

Response.Redirect("/Page"); Response.Redirect(“ / Page”);

So I get redirected to example.com/Page But it says to me "This link appears to be broken" 因此,我被重定向到example.com/Page,但对我说“此链接似乎已断开”

on httpd.ini I have this rule 在httpd.ini上,我有此规则

RewriteRule ^/Page$ /Page.aspx [L] RewriteRule ^ / Page $ /Page.aspx [L]

My guess is that the Response.Redirect doesnt go through the ISAPI_Rewrite... 我的猜测是Response.Redirect不会通过ISAPI_Rewrite ...

How can I fix this?? 我怎样才能解决这个问题??

Thanks 谢谢

===== edit: =====编辑:

solved, the hebrew chars was the problem, you need to encode them first. 解决了,希伯来字符是问题,您需要先对其进行编码。

if you do response.redirect the whole page life cycle is working. 如果您执行response.redirect,则整个页面生命周期都在起作用。 All the modules are called as usual. 所有模块都照常调用。 So maybe the rewrite module does not get called? 那么也许重写模块没有被调用? Did you put some breakpoints in the module so that you know if it gets called or not? 您是否在模块中放置了一些断点,以便知道是否调用了它? have you set up your module somewhere in your webapp? 您是否在Web应用程序中的某个位置设置了模块?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM