Forum Discussion
Hille_de_Graaf_
Nimbostratus
Jan 31, 2008http to https 301 redirect based on uri content
I am looking for a way to the following.
If I only enter the host, for example http://www.mysite.com, I want to send it with a HTTP-301 to https://www.mysite.com/home
If I enter http://www.m...
Joe_Sabek_47241
Jan 31, 2008Historic F5 Account
Try using the following :-)
when HTTP_REQUEST {
if {[HTTP::uri] eq "/"}{
HTTP::respond 301 Location "https://www.mysite.com/home"
} else {
HTTP::respond 301 Location "https://www.mysite.com[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