What to configure to deploy the laravel 9 project in server to live a website from cpanel?
Hello,
What to configure to .htaccess and add file to laravel 9 application to deploy the laravel 9 project to make live a new website in the server from the cpanel. In Laravel 9, I don't see the server.php in the root project. I have done the laravel 8 projects adding following line in .htaccess.
@Tray2 Thank you for your reply.
It works only when I put example.com/public, other otherwise it does not work. If I hit just example.com -> it gives 404 - Not Found. Error.
If I use that code in .htaccess under public directory. It shows all file on root url and If I go /public, it add another public in url like this /public/public and it does not work.
Thanks for reply.
@Tray2
one new .htaccess should be on project root. And we have write logic on it. What is the correct logic, that what I need. The above one didn't work.
This is enough in website root .htaccess. just create server.php or index.php and add require_once __DIR__ . '/public/index.php' I have done and work perfectly. In laravel there is already server.php, but in laravel 9, need to add this file.