Acl on host and past

I need to allow only private network (rfc1918) to access on the website www.test.com and all the IP to path start with chain /test1

thank’s for your help Regard

I also try this but don’t work

    use_backend pool_server if { path_beg -i -m beg /test1}
    http-request deny if { path_dir -i -m beg / } !{ src 192.168.0.0/16 172.16.0.0/12 10.0.0.0/8 }

    default_backend pool_server

and with this configuration the css…etc in /static don’t load.
I think I need to only allow rfc1918 on www.test.com and allow of the /* but I don’t know how do this .

Regards

Are your CSS files in the /test1 directory?

acl white_list src 192.168.0.0/16 172.16.0.0/12 10.0.0.0/8
acl test_dir path,url_dec -m beg -i /test1
use backend if white_list test_dir

or maybe

http-request deny if !{  path,url_dec -m beg -i /test1 } !{ src 192.168.0.0/16 172.16.0.0/12 10.0.0.0/8 }