开发者

Need help with Ionic rewriter in ASP.NET

RewriteRule ^/main/mypage$ / [I]
RewriteRule ^/main/mypage/$ /main/general/myPage.aspx?ID=$1&gid=$2 [I]

Above's the ionic entry in my .i开发者_如何学Goni file.

Now, when I write the following in my code file and run it it says "file not found". What's wrong?

str = str.Replace("#RESET#", "<a href='" + QAB.Con.mySite + "mypage?myID=" + ID + "&gd=" + gid + "'>Click here</a>");

Something's wrong with this part:-

"mypage?myID=" + UserID + "&gd=" + gid + "

Because when I type here the full name of the page, that is, /main/general/myPage.aspx instead of the above part then it runs all right.

How can it be fixed?

[EDIT] I made changes in "str" as follows. The same problem persists.

"mypage/" + ID + "/" + gid + "


Try removing the end slash, e.g., change

RewriteRule ^/main/mypage/$ /main/general/myPage.aspx?ID=$1&gid=$2 [I] 

to

RewriteRule ^/main/mypage$ /main/general/myPage.aspx?ID=$1&gid=$2 [I] 

Cheers Tigger

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜