IIS7 URL Rewriting Module Replace

前端 未结 5 659
再見小時候
再見小時候 2020-12-07 03:33

I really like the IIS7 URL rewriting module and so far, it worked great for me.

There is one thing that I\'m not sure how to do: I would like to permanently redirec

5条回答
  •  伪装坚强ぢ
    2020-12-07 03:58

    Perhaps I'm mad, but this seems to work...

    Use a URL_Rewrite rule using Regular Expressions with this pattern:

    ^(.*) (.*)
    

    Redirect to

    {R:1}-{R:2}
    

    I've tested this with a single space or many spaces and it works fine for me using IIS 10. Note that it works just as well for %20 as it does for "" in the URL string, cheers.

提交回复
热议问题