09-Oct-2023 08:05
Hi Team,
Need your help on below URL redirection.
https://tableau.ucsf.edu/#/views/ZeroHarm/Summary
https://tableau.ucsf.edu/#/views/ZeroHarm/ZeroHarmDetail
https://tableau.ucsf.edu/#/views/ZeroHarm/MetricDetail
it should be redirect on below URL.
https://tableau.ucsf.edu/#/views/ZeroHarm2_0-Summary/Summary
09-Oct-2023 09:02
Hi @msaud ,
you can test the below irule :
when HTTP_REQUEST {
if { [HTTP::host] equals "tableau.ucsf.edu"} {
if { [HTTP::path] contains "/Summary" or [HTTP::path] contains "/ZeroHarmDetail" or [HTTP::path] contains "/MetricDetail"} {
HTTP::redirect "https://tableau.ucsf.edu/#/views/ZeroHarm2_0-Summary/Summary"
}
}
}
you can do it using LTM policy it will be much easier , if you need a help on it just tell me.
I haven't tested this irule but it's correct as a syntax.
these are some Articles should help in this :
https://my.f5.com/manage/s/article/K15117465
https://my.f5.com/manage/s/article/K10112881
09-Oct-2023 11:16
Thanks for your support.
I think we should go for "you can do it using LTM policy it will be much easier "
09-Oct-2023 12:23 - edited 09-Oct-2023 12:24
Okay dear @msaud ,
you can configure it like this way :
No need to add host names , as I assume that this virtual server hosts only one hostname.
Try it and let me know
09-Oct-2023 13:43
We have F5 VS FQDN is vip-tableau.ucsf.edu and tableau.ucsf.edu is alias.
Name: vip-tableau.ucsf.edu
Address: 10.67.XX.XX
Aliases: tableau.ucsf.edu
09-Oct-2023 15:44
Hi @msaud ,
you should care with the FQDN " host name " that comes in each http request.
09-Oct-2023 23:43
I'm a bit late and Mohamed already gave you a solution that should work,
I'd just like to point out -for additional clarity- that since this is encrypted traffic, you need to run both clientSSL and HTTP profiles on your service in order to perform content modification. If back-end servers expect encrypted packets, you should also use a serverSSL profile.
Also, I don't know how many paths your web service is running, but I usually script "exact matches" when I have this type of request, to avoid disrupting (possibly) similar pages in different folders that don't need to be redirected.
Here's my input:
when HTTP_REQUEST {
if {[string tolower [HTTP::host]] eq "tableau.ucsf.edu" && [HTTP::path] starts_with "/#/views/ZeroHarm"}{
switch -glob [HTTP::path] {
/#/views/ZeroHarm/Summary -
/#/views/ZeroHarm/ZeroHarmDetail -
/#/views/ZeroHarm/MetricDetail { HTTP::redirect "https://tableau.ucsf.edu/#/views/ZeroHarm2_0-Summary/Summary"}
}
}
}
18-Oct-2023 04:17
To achieve the URL redirection you described, you'll need to set up server-side redirects using your web server's configuration. The method may vary depending on your web server software. If you're using Nginx, you can use the provided configuration example with the necessary adjustments. If you have a different web server, refer to its documentation for redirection settings. Don't forget to back up your configuration file before making changes.
20-Oct-2023 22:36
In summary, to achieve the URL redirection you want, set up server-side redirects based on your web server software. Use the provided Nginx configuration example if applicable, or consult your web server's documentation for redirection instructions. Always remember to back up your configuration file before making changes for added security.