Navigation

    Netgate Discussion Forum
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search

    HAProxy and HTTP 301 redirection

    General pfSense Questions
    1
    1
    1570
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      rocketscience last edited by

      Hi experts,

      I have a question about HTTP redirection using HAProxy and I didn't found anything here or on the web.

      For an incoming request to "http://www.example.com/test", I want to permanently redirect to "https://example.com/test" .
      So there are two things in here

      a) removing anything under the SLD
      b) using https if not originally requested

      I tried the following frontend configuration, but this does not work.

      ACL: Name:"rule1", Expression:"Host ends with:", Not:"no", Value:"example.com"
      Actions: Action:"http-request redirect", rule:"location https://example.com code 301", Condition acl names:"rule1"

      Can anyone help me? Appreciate your feedback!
      Alex

      1 Reply Last reply Reply Quote 0
      • First post
        Last post