Note that v2021 uses routing (read Migrating to v2021), in your case make sure you use Include common files for your Custom File. When you access the page, you use URL like //mysite/myapp/mycustomfile (no .php, not mycustomfile.php).Make sure also you have set up URL Rewrite properly, see the last post of https://discourse.hkvstore.com/t/migrating-to-v2022/655/1