simple HTTP host replacement... i think? It's not working for me.
I have an internal HTTP sharepoint site, but there are certain DNS names and paths that are mainly for aesthetics and some other things. I'll get to the point.
The internal site is 'internal.company.com/index.html' and Sharepoint needs to see this in the host header value. I don't even care about the response so much at this point. But here's what I need:
When someone goes to 'applicationA.company.com' I need a URI appended of "/departments/applicationA/index.html" (simple enough)
But someone may also receive an email with an embedded link of: 'applicationA.company.com/departments/applicationA/mydoc/me%today....etc...' And I need them to get to that exact document.
Here's my iRule:
when HTTP_REQUEST {
if {[HTTP::host] equals "applicationA.company.com"} {
HTTP::uri "/departments/applicationA/"
}
HTTP::header replace Host internal.company.com
}
The above works to a degree. If someone goes to applicationA.company.com, they get to the correct landing spot, which is internal.company.com/departments/applicationA/
However when someone clicks on a link - applicationA.company.com/departments/applicationA/mydoc/me%today....etc...
They get to internal.company.com/departments/applicationA/
When I add a trailing slash to the host name, as follows, it does the opposite. The hyperlinks bring you straight to the requested document. But if you go to applicationA.company.com only the host header is rewritten, and you land on internal.company.com/index.html.
when HTTP_REQUEST {
if {[HTTP::host] equals "applicationA.company.com/"} {
HTTP::uri "/departments/applicationA/"
}
HTTP::header replace Host internal.company.com
}
I imagine this should be simple but it's giving me a lot of grief. Should I be using datagroups?
Thanks in advance.