Forum Discussion

kpark_340842's avatar
kpark_340842
Icon for Nimbostratus rankNimbostratus
Apr 30, 2018

iRule to redirect web page content

if i have web site and if i like to redirect to on pics.abc123.com/pics/abcd/efg/abc.jpg. how do i need to preserve the path? and do the redirect?

 

thanks in advance..

 

1 Reply

  • if u wanna do it for only jpg/jpeg files:

    when HTTP_REQUEST {
        if { [HTTP::path] ends_with ".jpg" || [HTTP::path] ends_with ".jpeg"} {
            HTTP::redirect "pics.abc123.com[HTTP::uri]"
        }
    }