1

I am trying to achieve the following rewrite URL in IIS 7:

subdomain.domain.com/username should become subdomain.domain.com/?username

When I try to match the pattern /([^/]+) and test it with /username, it gives me

{R:0} /username
{R:1} username

and for the rewrite URL I have used /?{R:1}

However when I test it in a browser the site throws a 404 error and does not rewrite the URL.

Please what can I be doing wrong.

3
  • 1
    Try /&{R:1} in your rule.
    – bjoster
    Oct 8, 2018 at 13:53
  • Hi @bjoster, Tried it but still no result. Same 404 error
    – Templar
    Oct 9, 2018 at 14:19
  • Can you please watch the headers in your client (devtools)?
    – bjoster
    Oct 10, 2018 at 14:28

0

You must log in to answer this question.

Browse other questions tagged .