Forum Discussion
Balasubramaniy2
Nimbostratus
Sep 02, 2018Redirect the /robots.txt request to home page
Hi,
below URL not redirecting the /robots.test request to homepage. kindly help to achieve if request comes https://www.test.com/robots.txt then the request need to forward to homepage https://w...
youssef1
Cumulonimbus
Sep 02, 2018Hi,
remove ;;. try this:
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] equals "/robots.ext" } {
HTTP::redirect "https://www.test.com"
}
}
or
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] starts_with "/robots." } {
HTTP::redirect "https://www.test.com"
}
}
It will work for sure.
Regards,
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
