0

I have a specific folder containing ViewerJS that I want to bypass without using .htaccess

The path I want to work is /ViewerJS/#/files/viewfile/version where version is some integer.

The action viewerJS is not defined in AppController

Error: Create AppController::viewerJS() in file: src/Controller/AppController.php.

Is there any way to achieve this using CakePHP routing? I have managed to get this working before with .htaccess but would much prefer a native CakePHP way.

It's really just a way to tell CakePHP to not try to find a controller etc and just treat it as a direct link.

bemoore
  • 84
  • 7
  • Why do you not want to use `.htaccess`? It is by far more efficient (in terms of server resources) to let Apache handle that than to spawn a CakePHP process to deal with it. – Greg Schmidt Feb 22 '22 at 17:13
  • I can't use it locally with the Cake Server Shell when debugging locally. Sure, I could install a web server on my laptop but that's a pain to configure. This is for a small project so efficiency isn't a big issue. – bemoore Feb 22 '22 at 17:22

0 Answers0