Forum Discussion
SharePoint Redirect To New Path Using Public Name
The port number is usually not going to be included in HTTP::host for 80/443 requests. And, if this virtual server is using a client SSL profile, then your redirect based on the port 80 case will never get triggered.
You'll need to create a virtual server at port 80 using the same IP address, and apply the _sys_https_redirect iRule to it. That will redirect all http:// unencrypted connections to your SSL virtual server, which should have something similar to the rule I posted above attached to it.
IIRC, HTTP::redirect is basically the same as "HTTP::respond 302 Location: ". HTTP::respond gives you more control if you want to include other headers, cookies, etc with your response.
I am not sure that using the custom port number for your pool members will work, because SharePoint is expecting a certain URL scheme for requests to a particular zone. Ports 443 and 33230 would need to have their own zones in Alternate Access Mappings. I have never tried that...you may want to experiment a bit with that.
- BrianG_11931Jan 27, 2014
Nimbostratus
I actually have 1 iRule used in both a VS @ port 80 and VS @ port 443. I'm using code with-in my iRule to redirect instead of "_sys_https_redirect" because I use some other code in the iRule which is not relevant to this issue. Good point about port not being included for 80/443 requests. I updated my code to switch on "[TCP::local_port]" instead. I played around with the Alternate Access Mappings (AAM) and I could setup the server for traffic coming in from 443 (to port 33230) and I see the URL that I want in the browser finally (https://dashboards.domain.com/sites/BI/_layouts...), but I get the error message "Sorry, something went wrong. An unexpected error has occurred". My account has access to the site, so that shouldn't be an issue.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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