I have 3 sets of URL that need to to each be re-direccted to a 3 different static html pages that has some code that will be recognized by an external api call.
https://blah.companyA.com/grid/config/apps/XX-static/metadata needs to get redirected to https://blah.companB.com/page1
https://blah.companyA.com/grid/config/apps/YY-static/metadata needs to get redirected to https://blah.companB.com/page2
https://blah.companyA.com/grid/config/apps/ZZ-static/metadata needs to get redirected to https://blah.companB.com/page3
The origin URL has everythign same except the stuff between "apps" and "metadata"</div>
Can I do this with one website redirect?
I have been reading up on some $V $Q variable settings but am unclear on how to use it to do what I am trying to get done here.
Though you can use 3 different redirect rules to another URL (see redirect requests to another directory or Web Site), URL Rewriting is a better option:
Or, you could create an ASP.NET page named "metadata" in each of those directories that performs the redirect. Since there's no extension on the filename, you'd need to configure a wildcard mapping:
spursrule
1 Post
Redirection with IIS 6.0 variables
Feb 11, 2013 11:51 PM|LINK
This may have been answered before.
I have 3 sets of URL that need to to each be re-direccted to a 3 different static html pages that has some code that will be recognized by an external api call.
https://blah.companyA.com/grid/config/apps/XX-static/metadata needs to get redirected to https://blah.companB.com/page1
https://blah.companyA.com/grid/config/apps/YY-static/metadata needs to get redirected to https://blah.companB.com/page2
https://blah.companyA.com/grid/config/apps/ZZ-static/metadata needs to get redirected to https://blah.companB.com/page3
The origin URL has everythign same except the stuff between "apps" and "metadata"</div>
Can I do this with one website redirect?
I have been reading up on some $V $Q variable settings but am unclear on how to use it to do what I am trying to get done here.
Any help is much appreciated.
owjeff
680 Posts
Re: Redirection with IIS 6.0 variables
Feb 12, 2013 02:04 PM|LINK
Though you can use 3 different redirect rules to another URL (see redirect requests to another directory or Web Site), URL Rewriting is a better option:
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/41c238b2-1188-488f-bf2d-464383b1bb08.mspx?mfr=true
In IIS7, you could use the URL Rewrite module, however, that does not work for IIS6. I'd recommend either using a 3rd party rewrite option:
http://forums.iis.net/t/1160436.aspx
http://blogs.msdn.com/b/dotnetinterop/archive/2008/06/18/rewriting-urls-on-iis5-iis6-or-iis7-mod-rewrite-on-iis.aspx
Or, you could create an ASP.NET page named "metadata" in each of those directories that performs the redirect. Since there's no extension on the filename, you'd need to configure a wildcard mapping:
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/5c5ae5e0-f4f9-44b0-a743-f4c3a5ff68ec.mspx?mfr=true
OrcsWeb: Managed Windows Hosting Solutions
"Remarkable Service. Remarkable Support."