好吧,看起来我可以再次使用一些帮助......
目前,我正在努力在单一登录下合并三个应用程序。一个应用程序是自定义的,另一个是YAF,第三个是Screwturn wiki。目前,使用YAF的示例Web应用程序成功集成了自定义和YAF应用程序,似乎工作正常。
我目前遇到的问题是YAF附带的Intelligencia URL重写器。它将/Account/Login.aspx(我的原始登录)正确地重定向到YAF,甚至将/FreddyKrueger/Login.aspx等重定向到正确的登录名。但是当我进入Screwturn的安全页面时,我被重定向到:/Wiki/PageNotFound.aspx?Page=forum。
我最好的猜测是它重写了这个:/Wiki/Forum.aspx?login=stuff哪个Screwturn然后重新解释如上,当我相信,我需要它重写到这个:/论坛/登录。 ASPX。
此时,我不确定这是否是重写问题,子应用程序问题,或者更可能是两者。
再一次,任何和所有的线索都会受到高度赞赏,因为这是所有的志愿者工作,而且我已经花了很多时间试图解决这个问题。我在URL重写或正则表达式方面经验不足。
URL重写配置如下:
<rewriter>
<!-- Handle Standard Logins -->
<if url="^((?!forum).)*$">
<rewrite url="^~/(.+?)?login?\.aspx(\?(.+))?$" to="~/forum/forum.aspx?g=login&$2" processing="stop" />
</if>
<rewrite url="^~/forum/forum\.aspx\?g=login(&(.+))?$" to="~/forum/forum.aspx?g=login&$1" processing="stop" />
<!-- Standard URL Rewriting Format -->
<rewrite url="^~/Wiki/(.+?)?yaf_login?\.aspx(\?(.+))?$" to="~/$1Forum.aspx?g=login&$3" processing="stop" />
<rewrite url="^~/(.+?)?yaf_login?\.aspx(\?(.+))?$" to="~/$1Forum.aspx?g=login&$3" processing="stop" />
<rewrite url="^~/(.+?)?yaf_info?\.aspx\?i=([0-9]+?)&url\=(.+)$" to="~/$1Forum.aspx?g=info&i=$2&url=$3" processing="stop" />
<rewrite url="^~/(.+)?yaf_topics([0-9]+)p([0-9]+)(_([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+))?\.aspx(\?(.+))?$" to="~/$1Forum.aspx?g=topics&f=$2&p=$3&$7" processing="stop" />
<rewrite url="^~/(.+)?yaf_topics([0-9]+)(_([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+))?\.aspx(\?(.+))?$" to="~/$1Forum.aspx?g=topics&f=$2&$6" processing="stop" />
<rewrite url="^~/(.+)?yaf_forum([0-9]+)(_([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+))?\.aspx(\?(.+))?$" to="~/$1Forum.aspx?g=forum&c=$2&$6" processing="stop" />
<rewrite url="^~/(.+)?yaf_postst([0-9]+)find([-a-z]+)(_([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+))?\.aspx(\?(.+))?$" to="~/$1Forum.aspx?g=posts&t=$2&find=$3&$7" processing="stop" />
<rewrite url="^~/(.+)?yaf_postst([0-9]+)p([0-9]+)(_([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+))?\.aspx(\?(.+))?$" to="~/$1Forum.aspx?g=posts&t=$2&p=$3&$7" processing="stop" />
<rewrite url="^~/(.+)?yaf_postst([0-9]+)(_([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+))?\.aspx(\?(.+))?$" to="~/$1Forum.aspx?g=posts&t=$2&$6" processing="stop" />
<rewrite url="^~/(.+)?yaf_postsm([0-9]+)find([-a-z]+)(_([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+))?\.aspx(\?(.+))?$" to="~/$1Forum.aspx?g=posts&m=$2&find=$3&$7" processing="stop" />
<rewrite url="^~/(.+)?yaf_postsm([0-9]+)(_([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+))?\.aspx(\?(.+))?$" to="~/$1Forum.aspx?g=posts&m=$2&$6" processing="stop" />
<rewrite url="^~/(.+)?yaf_profile([0-9]+)(_([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+))?\.aspx(\?(.+))?$" to="~/$1Forum.aspx?g=profile&u=$2&$6" processing="stop" />
<rewrite url="^~/(.+)?yaf_rsstopicft([0-9]+)t([0-9]+)(_([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+))(_([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+))?\.aspx(\?(.+))?$" to="~/$1Forum.aspx?g=rsstopic&ft=$2&t=$3&$9" processing="stop" />
<rewrite url="^~/(.+)?yaf_rsstopicft([0-9]+)f([0-9]+)(_([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+))(_([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+))?\.aspx(\?(.+))?$" to="~/$1Forum.aspx?g=rsstopic&ft=$2&f=$3&$9" processing="stop" />
<rewrite url="^~/(.+)?yaf_rsstopicft([0-9]+)(_([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+))(_([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+))?\.aspx(\?(.+))?$" to="~/$1Forum.aspx?g=rsstopic&ft=$2&$8" processing="stop" />
<rewrite url="^~/(.+)?yaf_([-0-9a-z_]+?)\.aspx\?(.+)?$" to="~/$1Forum.aspx?g=$2&$3" processing="stop" />
<rewrite url="^~/(.+)?yaf_([-0-9a-z_]+?)\.aspx$" to="~/$1Forum.aspx?g=$2" processing="stop" />
<!-- Advanced URL Rewriting Format -->
<rewrite url="^~/(.+?)?error.aspx$" to="~/$1error.aspx" processing="stop" />
<rewrite url="^~/(.+?)?install/default.aspx?(\?(.+))?$" to="~/$1install/default.aspx?$2" processing="stop" />
<rewrite url="^~/(.+?)?install/$" to="~/$1install/default.aspx?$2" processing="stop" />
<rewrite url="^~/(.+?)?login?(\?(.+))?$" to="~/$1forum.aspx?g=login&$3" processing="stop" />
<rewrite url="^~/(.+?)?info?\?i=([0-9]+?)&url\=(.+)$" to="~/$1forum.aspx?g=info&i=$2&url=$3" processing="stop" />
<rewrite url="^~/(.+)?topics/([0-9]+)-(([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+))?(/page([0-9]+))(\?(.+))?$" to="~/$1forum.aspx?g=topics&f=$2&p=$6&$7" processing="stop" />
<rewrite url="^~/(.+)?topics/([0-9]+)-(([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+))?(\?(.+))?$" to="~/$1forum.aspx?g=topics&f=$2&$6" processing="stop" />
<rewrite url="^~/(.+)?/category/([0-9]+)-(([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+))?(\?(.+))?$" to="~/$1/forum.aspx?g=forum&c=$2&$6" processing="stop" />
<rewrite url="^~/(.+)?posts/t([0-9]+)findlastpost-(([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+))?(\?(.+))?$" to="~/$1forum.aspx?g=posts&t=$2&find=lastpost&$7" processing="stop" />
<rewrite url="^~/(.+)?posts/t([0-9]+)findunread-(([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+))?(\?(.+))?$" to="~/$1forum.aspx?g=posts&t=$2&find=unread&$7" processing="stop" />
<rewrite url="^~/(.+)?posts/t([0-9]+)-(([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+))?(/page([0-9]+))(\?(.+))?$" to="~/$1forum.aspx?g=posts&t=$2&p=$6&$8" processing="stop" />
<rewrite url="^~/(.+)?posts/t([0-9]+)-(([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+))?(\?(.+))?$" to="~/$1forum.aspx?g=posts&t=$2&$6" processing="stop" />
<rewrite url="^~/(.+)?posts/t([0-9]+)?(\?(.+))?$" to="~/$1forum.aspx?g=posts&t=$2&$5" processing="stop" />
<rewrite url="^~/(.+)?posts/m([0-9]+)findlastpost-(([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+))?(\?(.+))?$" to="~/$1forum.aspx?g=posts&m=$2&find=lastpost&$7" processing="stop" />
<rewrite url="^~/(.+)?posts/m([0-9]+)findunread-(([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+))?(\?(.+))?$" to="~/$1forum.aspx?g=posts&m=$2&find=unread&$7" processing="stop" />
<rewrite url="^~/(.+)?posts/m([0-9]+)-(([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+))?(\?(.+))?$" to="~/$1forum.aspx?g=posts&m=$2&$6" processing="stop" />
<rewrite url="^~/(.+)?profile/([0-9]+)-(([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+))?(\?(.+))?$" to="~/$1forum.aspx?g=profile&u=$2&$6" processing="stop" />
<rewrite url="^~/(.+)?admin/([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+)?/([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+)?(\?(.+))?$" to="~/$1forum.aspx?g=admin_$2_$3&$5" processing="stop" />
<rewrite url="^~/(.+)?admin/([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+)?(\?(.+))?$" to="~/$1forum.aspx?g=admin_$2&$4" processing="stop" />
<rewrite url="^~/(.+)?rsstopic/ft([0-9]+)t([0-9]+)-(([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+))(_([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+))?(\?(.+))?$" to="~/$1forum.aspx?g=rsstopic&ft=$2&t=$3&pg=$5&$7" processing="stop" />
<rewrite url="^~/(.+)?rsstopic/ft([0-9]+)f([0-9]+)-(([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+))(_([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+))?(\?(.+))?$" to="~/$1forum.aspx?g=rsstopic&ft=$2&f=$3&pg=$5&$7" processing="stop" />
<rewrite url="^~/(.+)?rsstopic/ft([0-9]+)-(([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+))_([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+)(\?(.+))?$" to="~/$1forum.aspx?g=rsstopic&ft=$2&pg=$3&$7" processing="stop" />
<rewrite url="^~/(.+)?rsstopic/ft([0-9]+)-(([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+))-([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+)(\?(.+))?$" to="~/$1forum.aspx?g=rsstopic&ft=$2&pg=$3&$7" processing="stop" />
<if url="^((?!\.ashx|\.asmx|\.axd|\.gif|\.png|\.jpg|\.ico|\.pdf|\.css|\.js|install|error|auth\.aspx|default\.aspx|popup\.aspx|advanced\.aspx|digest\.aspx).)*$">
<rewrite url="^~/forum/(.+)?\?(.+)?$" to="~/forum/forum.aspx?g=$1&$2" processing="stop" />
<rewrite url="^~/forum/(.+)?$" to="~/forum/forum.aspx?g=$1" processing="stop" />
<rewrite url="^~/forum/(.+)?\.aspx$" to="~/forum/forum.aspx?g=$1" processing="stop" />
</if>
</rewriter>
答案 0 :(得分:0)
这结果是继承问题。通过指示Wiki不从父应用程序继承,wiki停止尝试将重定向重定向到登录页面,作为其自己的wiki页面之一。