开发者

IIS7 URL Rewrite Patterns Query Template after QueryString

开发者 https://www.devze.com 2023-02-22 23:47 出处:网络
I am creating a Friendly URL Patterns in IIS Rewrite my normal URL would look like this http://localhost/orgprofile/financial.aspx?name=Test

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

精彩评论

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