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

    Reg_ex help

    Scheduled Pinned Locked Moved Cache/Proxy
    2 Posts 2 Posters 701 Views
    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
      roderick1st
      last edited by

      Dear pfSense Community,

      I am currently using pfSense 2.3.4.

      Using Squid Reverse Proxy I am trying to point two URL's to different web servers.

      I want to capture one URL which is http://www.mydomain.com and point it to web server number 1

      I want to capture the second URL which is http://mydomain.com and point it to web server number 2

      I am desperately trying to work out a regular expression which will separate two URL's  apart, and passing anything else that may be added to the end of each URL to the correct URL.

      ie:
      www.mydomain.com/test/index.html –> Server 1
      www.mydomain.com/website.default.php --> Server 1
      www.mydomain.com --> Server 1

      mydomain.com/test/index.html --> Server 2
      mydomain.com/website.default.php --> Server 2
      mydomain.com --> Server 2

      Any Reg_Ex experts out there who may know the answer? No matter what I try pfSense watch either and pushes the requests to both servers which is obviously a problem.

      Thanks.

      Rod.

      1 Reply Last reply Reply Quote 0
      • P
        pfsensation
        last edited by

        Why do you need regex for this? Why not use host overrides?

        Point mydomain1 to server 1
        Mydomain2 to server 2

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.