Forum Discussion
iRule for migrating to Sharepoint Online
Hello,
I'm very new to the F5 platform and creating iRules. I did try searching the forums, and there is a lot of good information (thank you contributors), but can't find a solution to exactly what I need to do.
We are migrating off an on-premise Sharepoint to Sharepoint Online/365. I would like to have an iRule that states:
If you are going to myportal.company.com then redirect to sharepointonline.company.com but if there is anything after the URI then redirect to sharepointonline.company.com/sites/<URI>
For example:
myportal.company.com = sharepointonline.company.com
myportal.company.com/hr = sharepointonline.company.com/sites/hr
myportal.company.com/aa = sharepointonline.company.com/sites/aa
I was hoping not to have to list out every URI, but I didn't know if I could use a wildcard. Any help or pointers would be appreciated
Hi joeinbuffalo,
when HTTP_REQUEST { if { [HTTP::host] eq "myportal.company.com" } { if { [HTTP::uri] eq "/" } { HTTP::redirect "https://sharepointonline.company.com" return } else { HTTP::redirect "https://sharepointonline.company.com/sites[HTTP::uri]" return } } }
Hi joeinbuffalo,
when HTTP_REQUEST { if { [HTTP::host] eq "myportal.company.com" } { if { [HTTP::uri] eq "/" } { HTTP::redirect "https://sharepointonline.company.com" return } else { HTTP::redirect "https://sharepointonline.company.com/sites[HTTP::uri]" return } } }
- joeinbuffaloNimbostratus
Hello Enes_Afsin_Al,
This worked perfectly! I truly appreciate your time and expertise in assisting me.
Thank you!
Joe
Right out of the gate you got the word direct from one of our MVPs! Great well-formed question. Quick easy answer.
Nice.
Thanks Enes_Afsin_AlWelcome to the DevCentral community joeinbuffalo!
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com