Forum Discussion
Anthony_1648
Nimbostratus
Jul 27, 2010configuring URL redirection from a Virtual Server
I'm not sure if this is possible, but here is what I'm trying to do. I'm trying to redirect URLs using my LTM's instead of using MS IIS. For example I want www.mydomain.com redirected to www.mydoma...
hoolio
Cirrostratus
Jul 27, 2010Hi Anthony,
I'd start with adding debug logging to the iRule so you can see the values you're checking and make sure they return values you're expecting. You can do this with the log command and checking the /var/log/ltm file for the output. Once you give that a try, can you test something like this?
when HTTP_REQUEST {
log local0. "[IP::client_addr]:[TCP::client_port]: [HTTP::method] request to [HTTP::host][HTTP::uri]"
if {[string tolower [HTTP::host]] equals {www.mydomain.net}} {
log local0. "[IP::client_addr]:[TCP::client_port]: Redirecting to http://www.yourdomain.com/test/mobile-printing-solutions.aspx"
HTTP::redirect {http://www.yourdomain.com/test/mobile-printing-solutions.aspx}
}
}
Aaron
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
