Hello! We are 1 step away from submitting a new add-on to the PRB and have run in to a little road block. We have a process that uses htaccess to redirect certain types of files to a script. Initially we built the script as a standalone file outside of Concrete5 and everything worked fine. When we created a route and brought it in to the package, Concrete5 delivers a 404 when the htaccess redirects to our defined route / function. Not really sure where to go from here. Wondering if anyone has a suggestion as we figured the file cannot be a standalone script. Thanks!
It sounds like .htaccess
rule might not be working as expected. Could you provide a minimal working example of the problem?
Also, why are you using both .htaccess
and routes? Can’t you do it all from within Concrete?
Well in short, we are implementing this project in to an add-on to convert images to webp on the fly: https://github.com/rosell-dk/webp-convert
We have an option to not use .htaccess, but we are trying to provide both for any performance gains it might have. I found a work around, basically, the on_start event fires and the URI is correct, but for some reason it won’t hit the route, so I wrote my statement in to the on_start method instead.