开发者

Need help with Ionic rewriter in ASP.NET

开发者 https://www.devze.com 2023-01-19 05:39 出处:网络
RewriteRule ^/main/mypage$ / [I] RewriteRule ^/main/mypage/$ /main/general/myPage.aspx?ID=$1&gid=$2 [I]
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

精彩评论

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