OPNsense Forum

English Forums => Tutorials and FAQs => Topic started by: mimugmail on December 10, 2017, 09:16:36 am

Title: HAProxy: Reroute / to /subfolder
Post by: mimugmail on December 10, 2017, 09:16:36 am
Another quick guide since I only found stuff for pfsense or HAProxy itself.
This quide is based on plugin version 2.1

- Create a called "root"
- Condition type "Path matches"
- Patch matches "/"

- Create a rule called "rewrite"
- Test type "IF"
- Select conditions choose "root"
- Logical ops is "none"
- Execute function is "http-request redirect"
- HTTP Redirect parameter: code 301 location http://www.domain.com/subfolder/

- Under Public Services edit your frontend and add "rewrite" to Selected Rules.

Save and you're done! :)
Title: Re: HAProxy: Reroute / to /subfolder
Post by: fabian on December 10, 2017, 03:08:06 pm
I am not sure if that would fit better into the docs.
Title: Re: HAProxy: Reroute / to /subfolder
Post by: mimugmail on December 10, 2017, 05:34:46 pm
Yep, but I may not fork it since the licensing with some images is still not fixed :)