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

    Squid reverse proxy - redirect subdirectories

    Scheduled Pinned Locked Moved pfSense Packages
    1 Posts 1 Posters 1.5k 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.
    • H
      heychris
      last edited by

      All,

      Thanks for all the hard work.  I'm a big fan of pfsense.

      Despite many hours of searching I'm having a problem with squid reverse proxy.

      I am trying to redirect a url  mydomain.com/mydirectory  to an internal server 192.168.2.11/mydirectory.

      The problem is  there are icons which exist in 192.168.2.11/icons

      Initially I tried a mapping.  I made the URI to match  .mydomain.com .mydomain.com/mydirectory
      www.mydomain.com http://www.mydomain.com/ ^http://www.mydomain.com/mydirectory/.*$

      I don't fully understand the syntax of the regex.

      My problem - any subdirectory of mydirectory  such as www.mydomain.com/icons/icon.gif  gets translated to 192.168.2.11/mydirectory/icons/icon.gif

      So I removed the mapping and tried a redirect.

      blocked domain (unsure why it's called that)  www.mydomain.com
      regex - I tried both ^/$  and ^/mydirectory/$
      redirect - 192.168.2.11/mydirectory

      This has the same result..    www.mydomain.com/icons/icon.gif  gets translated to 192.168.2.11/mydirectory/icons/icon.gif

      any help would be appreciated.

      Chris

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