Leo
Nimbostratus
Mar 01, 2012Changing the URL
Hello friends,
I would like to add "www" to url's without it. meaning, if someone goes to "http://example.com/page.html" the F5 will redirect it to "http://www.example.com/page.html".
I've made the following iRule".
when HTTP_REQUEST {
if {[HTTP::host] ne ""} and {!{[HTTP::host] contains "www."}} {
HTTP::respond 301 Location "http://www.[getfield [HTTP::host]][HTTP::uri]"
}
}
I'm not so sure about the syntax, how does it look?