Forum Discussion
UniFirst1_22521
Nimbostratus
Feb 21, 2019301 redirect replacing www if present
Trying to create an iRule that will redirect HTTP to HTTPS and remove example incoming would be http://www.unifirst.ca and it would be redirected to https://unifirst.ca with a 301 response not a 302...
wlopez
Cirrocumulus
Feb 21, 2019What are the different hostnames/URLs you're planning to redirect from http to https on the http virtual server?
If you're only managing a single domain with two URL variants (Ex. , unifirst.ca) the simplest way would be to redirect all http requests to the desired hostname:
when HTTP_REQUEST {
HTTP::respond 301 Location "https://unifirst.ca[HTTP::uri]"
}
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects