I have a SharePoint Enterprise site where I can get URL's to redirect locally, this was necessary due to content moving from the existing site to SharePoint and those mappings I have done. Now I have been asked to have some redirects away from the SharePoint site to another app server, so that any requests for an application URL within SharePoint should go to another server. This seemed possible to do with redirects but the Rules never seem to catch the URL, I end up seeing the requested application in the ULS logs, so it looks like the Rule never got caught.

What I want is something like: http://test.com/applicationName to go to http://testapp.com/applicationName test.com is the SharePoint server and testapp.com is another server in the same domain. applicationName is the URL to the main application page, in ULS I see /applicationName show up in the log as HTTP Request URL:/applicationName

I've set up multiple rules, both inbound and outbound, and it doesn't seem like this is working in the SharePoint environment - perhaps because its another server?

Simply my rules have looked for the URL with some RegEx's like .com/(.) where the backtrace of R:1 captures my applicationName, I then try to use a redirect of http://testapp.com/{R:1} so that I can request the same applicationName but on the different server but this doesn't seem to work. I've seen notes where I can do Redirects with SharePoint and URL Rewrite but not Rewrites, but even then when I have tried either way I still end up getting nowhere - not even an entry in the Failed Request Logging when that has been turned on.

Any ideas of where I could look or try and get more on this? Thanks!

2 Answers 2


So, it looks as if I didn't really need to worry about capturing the host header, while I was trying to get a regular expression like this to work:


Where the backtrace was the myapp that I wanted to redirect, I really only needed something like:


This gave me the {R:0} match that I needed so that making the Redirect action of:


Worked great!

Hope this helps someone else if you are trying this. We added these rules into the root of the Web Server, so even if the server is the SharePoint Web Front End it will cover the URL redirects exactly like we want without worrying about the adjustments of the SharePoint site web.config. Which is important in my environment since that web.config gets updated by us on each WSP deploy due to customizations we need to make, I really wanted to avoid getting the URL Redirect rules in that web.config if I could.

Thanks to my awesome IT guy who helped me work this out.


In this example, I would ask the Network guys to help you with a DNS forward rule...

Or, you can edit your Hosts file on the Server and add a entry as follow: test.com testapp.com

Hope this helps

  • I'm not sure that is the issue since it seems like the Rules are being totally ignored, although that makes me wonder if I should be doing this on the Web Server or on the Load Balancer. Interesting...thanks for the new view!
    – MichaelF
    Commented Jun 29, 2011 at 13:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.