开发者

IIS7 URL Rewrite Patterns Query Template after QueryString

I am creating a Friendly URL Patterns in IIS Rewrite

my normal URL would look like this

http://localhost/orgprofile/financial.aspx?name=Test

and initially I picked from the options available in IIS

the friendly URL with

http://localhost/orgprofile/financial/test

With Pattern

^orgprofile/financial/([^/]+)/?$

Now I only want to change the friendly URL to

http://localhost/test/finan开发者_如何学编程cial

So yes the querystring first then append financial

I can get this friendly URL to work

http://localhost/financial/test

^financial/([^/]+)/?$

But cant get this to work

http://localhost/test/financial

i.e something like

([^/]+)/?$/^financial


$ means the end of the query string - you need to leave that at the end.

Try:

^([^/]+)/financial/?$
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜