Error 404 on production server only

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
Cat
User
Posts: 83

Error 404 on production server only

Post by Cat »

Hello everyone

in version 2024 on localhost it works fine but when I put it into production I meet the requirements there is always an error

ERROR: 404 Not Found Type: Slim\Exception\HttpNotFoundException Code: 404 Message: Not found. File


mobhar
User
Posts: 11841

Post by mobhar »

You may search by using HttpNotFoundException keyword in this forum.


arbei
User
Posts: 9603

Post by arbei »

Make sure you have setup URL Rewrite on your server properly.


Cat
User
Posts: 83

Post by Cat »

seems to be related to the output name on localhost

In localhost it is created in a folder and in production the files are uploaded to the root


mobhar
User
Posts: 11841

Post by mobhar »

The closest approach is to always put the script files into the same folder name in production server, as well as the folder name in localhost.

The advantages of this method is you will be able to know quick which folder should be looked at, especially when you want to synchronized/re-uploaded your script files from localhost to production server.

Just my two cents. ;-)


arbei
User
Posts: 9603

Post by arbei »

Cat wrote:

In localhost it is created in a folder and in production the files are uploaded to the root

Make sure you have not set RewriteBase directive in such case because the base paths are different on the two servers. If you use v2024, it should be fine to run without setting RewriteBase directive.

Also, double check the web server type of your production server, if it runs Nginx (not Apache), then you need to set up your web server as said in URL Rewrite -> Nginx.


Post Reply