A few days ago I uploaded my laravel project to my hosting with my test domain, in cPanel.
There I could see that my vue components were not loading, I did not see the data tables, etc..
Searching, I compiled the js and css, although the latter was not there and created a build folder in public. I uploaded the project back to hosting, and the vue components are already displayed, but the strange thing is that the API requests do not work, so the components are empty ...
For example: I have a table of users, which makes a request to api/userApi, this returns me a 404, however, if I go to route:
myDomain/public/api/usersApi
Because for my project to run, I have to access public, it returns the list of users perfectly. In my .env I have defined this:
APP_URL=https://miDominio.com/public/
I have deleted cache, deleted the bootstrap folder content, deleted cache config... but it doesn't work.
In localhost all run ok
What am I doing wrong?
Update:
My htaccess:
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Send Requests To Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
php_value allow_url_fopen On
</IfModule>