Forum Discussion
URL redirection
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
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"} } } }
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 :- RobertRalstonNimbostratus
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.
- lylawaNimbostratus
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.
Recent Discussions
Related Content
* 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