bosecom Developer Lähettäjä United Kingdom Jäsen alkaen toukok. 2023 bosecom 15 toukok. 2023 22:28 I get no response from the api.php file in the route directory. If you go to the website repairs.bosecom.org.uk/api.php/orders for example. it will give you 404. What is the rewrite condition for nginx? Thanks Rob
tim Founder Lähettäjä Sweden Jäsen alkaen toukok. 2013 tim 15 toukok. 2023 22:36 Hi, have a look at this article. https://wiki.litecart.net/how_to_run_litecart_on_nginx I think you maybe need to use "tryfiles"? rewrite ^/(cache|images)/ /$request_uri last; try_files $uri $uri/ /index.php$is_args$args; }```
bosecom Developer Lähettäjä United Kingdom Jäsen alkaen toukok. 2023 bosecom 16 toukok. 2023 11:03 I have done that however the error still appears. still trying to get the api to work.
tim Founder Lähettäjä Sweden Jäsen alkaen toukok. 2013 tim 16 toukok. 2023 12:13 Did you put api.php in the application root next to index.php? try_files $uri is the code that should resolve the file.
bosecom Developer Lähettäjä United Kingdom Jäsen alkaen toukok. 2023 bosecom 16 toukok. 2023 12:36 the file was always in the root dir (where index.php is) I manged to fix it. It was a problem with your preg replace, it didnot remove the "/api/" . After editing the line to make it remove that and return the url string for the collection it works fine. Thanks I also had to add location in nginx to pass location /api/ { try_files $uri $uri/ /api.php$is_args$args; } To make it work and rewrite the url.