I moved a site to a new server, and now when I visit the site URL, it automatically takes me to www.site.com/login as the route is designed, but then I get a 404.
I thought I adjusted to .env and index.php files correctly for the directory structure and new site address.
it's unlikely need to change .env nor index.php as it's irrelevant in routing, you need to ensure the document root, .htaccess and web.php are set correctly, especially typo error or case sensitivity issue...
I have placed all of my app files into a subdirectory (myapp) in the root (same level as public_html), so I have to change two lines in index.php, right:
That is a bit non-descript. I have seen multiple tutorials on how to do this to have the web root above the other project files. I know that it is an issue of security, but I need to be able to place my project files in such a way that they work.
Natively, the "public" folder cannot be dropped into the "public_html" folder and it work correctly. And not all VPS's have access to change their Apache config files.