xj728 - 2008-5-23 18:19:00
在论坛里新建一个目录后,里面的页面访问不存在,如何解决?
比如路径:
http://www.discuz.net/test/test.aspx已经将dll放入bin目录中,由于HttpModel被discuz按管,访时会提示找不到页面.难道非要将页面放到asp/1目录里? 有没有其它解决办法?
xj728 - 2008-5-23 18:19:00
官方能不能出来一个人给解答一下
xj728 - 2008-5-24 10:03:00
再顶
xj728 - 2008-5-26 12:45:00
我在HttpModule类的ReUrl_BeginRequest方法里增加了下面的代码
else if (requestPath.StartsWith(forumPath + "rm/"))
{
//当使用伪aspx, 如:showforum-1.aspx等.
if (config.Aspxrewrite == 1)
{
string path = requestPath.Substring(forumPath.Length + 5);
foreach (SiteUrls.URLRewrite url in SiteUrls.GetSiteUrls().Urls)
{
if (Regex.IsMatch(path, url.Pattern, Utils.GetRegexCompiledOptions() | RegexOptions.IgnoreCase))
{
string newUrl = Regex.Replace(path, url.Pattern, Utils.UrlDecode(url.QueryString), Utils.GetRegexCompiledOptions() | RegexOptions.IgnoreCase);
context.RewritePath(forumPath + "rm" + url.Page, string.Empty, newUrl);
return;
}
}
}
return;
}
为什么访问rm目录里的.aspx文件时,还是提示找不到资源?而与之相同的tools目录里就没有问题呢?
xj728 - 2008-5-26 14:59:00
再顶顶
xj728 - 2008-5-26 15:03:00
顶顶顶