I've figured out the problem. It's two parted.
1. The regex library used in this case does not seem to support negative lookaheads like "(?!word)" for some reason. Not sure what library is used, if it's bundled with squid or if a local regex library is used. Maybe something can be done here?
2. It's indeed a allow/deny config. I think the only way to achieve what we're trying to do if problem 1 cannot be solved is to add some functionality to the reverse proxy GUI.
acl rvm_server1 url_regex -i ^https?://(www.)?domain.com.$
acl rvm_server2 url_regex -i ^https?://(www.)?domain.com/cloud($|/).$
cache_peer_access rvp_server1 allow rvm_server1
cache_peer_access rvp_server2 allow rvm_server2
cache_peer_access rvp_server1 deny allsrc
cache_peer_access rvp_server2 deny allsrc
never_direct allow rvm_server1
never_direct allow rvm_server2
http_access allow rvm_server1
http_access allow rvm_server2
Above is an excerpt from my squid.conf as generated by pfsense. Adding a single line at the correct position solves the problem.
cache_peer_access rvp_server1 deny rvm_server2
Adding the line above before the allow line of rvp_server1 and presto. Doing this from the GUI is probably easier to do by adding another url_regex on the same mapping page and denying that instead of cross referencing and I'm doing above.
Does anyone acquainted with the pfsense squid package have any input on this? Maybe the thread should be moved to packages too.