I want to deploy the Laravel project to my shared hosting.
When I go to my site main domain (example.com) It displays all directory and files but (example.com/public) works fine.
What if I just create an index.php
file in the project root directory with following code
<?php
header('Location: ./public');
?>
It just redirects me to example.com/public
.
Just tell me if there will be an issue that may occur at any point? I am new to Laravel.
I don't care to remove the public directory. I only care if someone goes to example.com
then it just redirects example.com/public
to work fine.
Update
Just keep it short and simple answer (Yes/No) then explain it.
Is there will be an issue that occurs with the above steps (actions)? (Yes/No)