Forum Discussion

Phu_V__Huynh_16's avatar
Phu_V__Huynh_16
Icon for Nimbostratus rankNimbostratus
Aug 14, 2014

SharePoint 2013 and F5 iRule redirect

Hi, I need some help with a seem-to-be-simple iRule I'd like to create on the F5 please. My scenario is as detailed below:

 

  1. I have a SharePoint 2013 web application that currently accessible via http://abc.mydomain.com.
  2. abc.mydomain.com is pointed to the F5 and the F5 in turn, sends the request to either one of the 2 web servers in the SharePoint farm.

I would like to be able to enter just http://abc on the browser and have the F5 convert or redirect that to the FQDN http://abc.mydomain.com.

 

How do I achieve that please? I am fairly to the F5 and not sure about the correct iRule syntax and other steps that are required to make this happen.

 

Thanks, Phu V. Huynh

 

6 Replies

  • This happens automatically on the browser side before the request is sent. It will append the default domain and see if that resolves to an IP address. Typically organisations have a list of search domains which they add as well which means it should iterate through them looking for match with your host. This is all done in DNS. If you make sure your sharepoint domain is in there it should work for you.

     

    Now whether the browser updates the URL in the browser windows to the full hostname really depends on the browser. Generally it just passes the details to DNS and asks for a resolution. When it gets an IP address then it connects.

     

    • Phu_V__Huynh_16's avatar
      Phu_V__Huynh_16
      Icon for Nimbostratus rankNimbostratus
      Hello Kevin, Thanks for replying to my question. What you explained sounds simple enough but I have not been able to get it to work. My current configurations are like this: 1. A record abc created on the DNS pointing to the F5. 2. On the browser, I can access the SharePoint site if I type in the FQDN http://abc.mydomain.com 3. But if I only type in http://abc, then I get the IIS image on the browser. What am I missing here please? Thanks
  • Your best bet in this case is to use the power of iRules to tell you what is going on. You will need to be terminating SSL on the F5 and have a http profile applied to use this iRule.

    when HTTP_REQUEST {
      log local0. "Host: [HTTP::host] URI: [HTTP::uri]"
    }
    

    Now make your request and see what is in the logs. Paste key log information here. When you have, select the entries and hit tab to format them correctly.

    • Phu_V__Huynh_16's avatar
      Phu_V__Huynh_16
      Icon for Nimbostratus rankNimbostratus
      Hello Kevin, I set up the iRule as you have suggested but I am not sure how to find the right log. I went to System > Logs > Local Traffic and saw a lot of events there but there is no option to click on individual log to capture the details. Would you please shed some lights to this? Thanks a lot!
    • Cory_50405's avatar
      Cory_50405
      Icon for Noctilucent rankNoctilucent
      Log into the CLI and get into bash shell, then do this: less /var/log/ltm | grep Host: This should show you all log entries from your iRule.