hellomoto Posted December 15, 2025 Posted December 15, 2025 (edited) Specifically is it not possible to intercept the file path being accessed directly via PHP? I know htaccess can be used on Apache server; what about on Nginx, since it only has a single access config file per server? How does ProcessWire implement its access directives in nginx? Edited December 15, 2025 by hellomoto typo
Sergio Posted December 17, 2025 Posted December 17, 2025 Considering you have i.e. `example.com/site/assets/file.zip` being accessed, you could: 1. Add a rule on Nginx as you mentioned. But ProcessWire won't help you with that; you need to change the Nginx config yourself. location = /some/spec/path/ { root /home/myweb/path; try_files /file.zip =404; } //NOT TESTED! 2. Or, if you are using Cloudflare as DNS provider, you can add a rule there to create the redirect without touching your server.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now