IIS 7 and Above
URL Rewrite Module
I can't get a redirect to work
Last post Jul 02, 2019 01:36 AM by Able
Jul 01, 2019 12:03 PM|Adrian Coles|LINK
I had an old application that was accessible via:
After a major version upgrade the URL is now:
I am using the pattern (.*)/Web-Application/(.*) and the redirect action of:
If I test the pattern it all makes sense.
If I apply it and test it in a browser, I get:
Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404.</div>
Jul 01, 2019 03:19 PM|Rovastar|LINK
The best way to understand what is happening is to tarce it.
It is unclear if you are matching you rule of not.
It is always tricky referencing something in a match that appears in the final output.
But I would use ^Web-Application/(.*) (with then (R:2) in the rule.
As you only want to match the start of it.
But there are hundreds of ways of writing rewrite rules
And just to clear you are calling your new upgrade "Legacy" ?;/
But also post you full rule and explain what you see in the browser window URL. If it is 404 it implies that you are redirecting to the wrong place.
Jul 02, 2019 01:36 AM|Able|LINK
According to your description,it seems that you are using iis url rewrite module.However based on the error message , it didn't find the any resource about url after redirecting.
So I hope you could share your rules and show us an example about your requirment , which url you want to jump from to which url.