Forum Discussion
sbadea_81872
Nimbostratus
Apr 03, 2013iRule and robots.txt
Hi all,
I have an irule that redirects HTTP to HTTPS and adds www (see below). Is it possible to skip enforcing SSL to a page that looks like this http://www.mycompany.com/robots.txt
when H...
Arie
Altostratus
Apr 04, 2013For readability and brevity this might be better:
when HTTP_REQUEST {
if { not ([HTTP::path] starts_with "/robots.txt") } {
if { ([HTTP::host] equals "mycompany.com") } {
HTTP::redirect "https://www.mycompany.com"
} elseif {
([HTTP::host] equals "www.mycompany.com") } {
HTTP::redirect "https://www.mycompany.com"
}
}
}
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