Username (e.g. epiz_XXX) or Website URL
epiz_29114664 && up2u.rf.gd
I’m trying to deploy laravel 8 project. I’ve uploaded all the files, move the index.php from public folder to root folder and do some modification so that it can access vendor folder & bootstrap folder correctly, but when I open the website, it says 404 error. I’m 100% sure that I’ve placed all the file right at its place
I’ve also modified the .env folder so that it can access the database in the online server.
Hi and welcome to the forum
Somewhere in the route is probably a problem
check all important config files
if I type
index.php in the address I get a page that is a login
and it seems to me that your entire
assets folder is empty or that it doesn’t exist at all and that’s why a lot of resources are missing.
It’s late here and I don’t have any more concentration so I can’t do more than this… but at least you have some clue.
Why can’t I access it without mentioning index.php?
It looks like you tried to make Laravel work by copying the contents of the
public folder to the main directory.
This could work, but you also need to copy the .htaccess file if you do.
But I would recommend to just leave the public folder as-is and use this .htaccess rule instead:
I was just playing around with a Laravel installation on free hosting.
Normally, you should change the document root of your website to the public folder with Laravel. You can’t do this on free hosting, but you can simulate this with .htaccess rules. These are the the .htaccess rules I used:
RewriteRule (.*) /public/$1 [L]
Simply create a file with the name .htaccess and these contents and upload it directly to your htdocs folder. This should rewrite all web requests to the p…
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.