Forum Discussion
Ravager
Altostratus
Nov 19, 2019LTM redirection at directory level
Hopefully an easy query for someone. What is the correct secure way to ensure users cannot access top level folders on a webserver. ie have https:\\xxx.com with 3 sites \site1, \site2, \s...
Nov 19, 2019
Hi Ravager,
If you have one domain:
when HTTP_REQUEST {
if { [HTTP::host] equals "xxx.com" and [HTTP::uri] equals "/" } {
drop
# or redirect
# HTTP::redirect "https://xxx.com/xyz.html"
}
}
If you have 3 domains, you can try this iRule:
when HTTP_REQUEST {
if { [HTTP::uri] equals "/" } {
switch -glob [HTTP::host] {
"site1.com" { HTTP::uri "/site1" }
"site2.com" { HTTP::uri "/site2" }
"site3.com" { HTTP::uri "/site3" }
}
}
}
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