How to deploy laravel 7 app with subdomain to a subfolder on shared hosting?
I'm trying to deploy a laravel 7 app from my local machine to my shared hosting provider. The app has a public part and an administration part. The routes of the administration part are under a subdomain. Users can go to the public pages and then login to the admin part. On the local machine everything works fine: the user goes to localhost/login and after login gets redirected to admin.localhost/home.
When I enter mydomain.com/mysubfolder the app is properly loaded. However when I'm trying to log in to the admin area, after the login the redirection wants to go to admin.mydomain.com/home but I get a "404 We're sorry, the page you requested cannot be found." message. I created an admin.mydomain subdomain under cpanel and pointed it to the subfolder where my app is located, but it did not help.
So to summarize my question: what steps do I need to take to deploy an app to subfolder on a shared hosting space, if my app also has a subdomain part, so that everything works correctly?
@punksolid Thanks, I will consider replacing the subdomain with a path, if there is really no solution to this. I already created an admin.mydomain subdomain that points to the folder that contains my app, but as I wrote above, for some reason the page is not found. Let me know, if you have any thoughts on how to debug and fix this. Thanks!