I’m trying to create a profile or Irule to redirect links from a dead site to another site.
Old:
New:
I was able to create a profile that changes the host name and changes the path from /forms/pdf to /Dir%20PDF. The profile also redirects to https. The redirect works but the pdf filename is not part of the redirect. I have not been able to determine why.
The below should work if I understood you right…Again Jie helped me the other day so I would wait for his input as well..
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] eq "oldsite" } and ([string tolower [HTTP::uri]] contains "/forms/pdf/somepdf.pdf") } {
HTTP::redirect "https://newsite/Dir%20PDF/somepdf.pdf"
else { use pool default_pool
}
}
where default_pool would be your existing pool on that vip.