Forum Discussion

8 Replies

  • 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 "" && [HTTP::path] starts_with "/#/views/ZeroHarm"}{
        switch -glob [HTTP::path] {
          /#/views/ZeroHarm/Summary -
          /#/views/ZeroHarm/ZeroHarmDetail -
          /#/views/ZeroHarm/MetricDetail { HTTP::redirect ""}


  • Hi msaud , 
    you can test the below irule : 

    when HTTP_REQUEST {
      if { [HTTP::host] equals ""} {
        if { [HTTP::path] contains "/Summary" or [HTTP::path] contains "/ZeroHarmDetail" or [HTTP::path] contains "/MetricDetail"} {
          HTTP::redirect ""

    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 :

    • msaud's avatar
      Icon for Cirrus rankCirrus

      Thanks for your support.


      I think we should go for "you can do it using LTM policy it will be much easier "

      • 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 

  • 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. 

  • lylawa's avatar
    Icon for Nimbostratus rankNimbostratus

    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.