Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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!

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

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:

^.*com[/]{0}(myapp.*)

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

^myapp[/].*

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

http://testapp.com/{R:0}

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.

share|improve this answer
add comment

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

share|improve this answer
    
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 Jun 29 '11 at 13:46
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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