I am trying to rewrite a url to a different one by using inbound rule on IIS. What I am trying to do is basically any request thats like localhost/Membership/Login will be localhost/handlers/mapper.ashx?url=Membership/Login. What I have done is creating a pattern something like below
(Membership\/)(.+)
and the rewrite url is
http://localhost/handlers/mapper.ashx?url={R:0}
Actually this way did not give me the solution what I want. It keeps working as a normal request not goes to the mapper.ashx.
What can be the problem ? What is the proper way to do something like that ?
Thanks in advance,
As Dallas already pointed out you ask for something else than what your own solutions suggests. But I will give you both options. First of all, if you just need the
loginpart of the URL as amethodnameparameter for your handler you can use the following rewrite rule:If you need the complete URL in the
urlparameter as your own solution suggests then you can use the following rewrite rule: