I've a Laravel5/angularJS app (beeing Laravel as an api rest and angular for the front-end)
At my local environment everything works like charm.
But when i upload to a hosting i can only access to the index page, everything else throws a 404.
in my shared hosting i have the file-system like this.
public_html
laravel-backend (it has app, bootstrap, confi...etc, all laravel app)
laravel-frontend (it would be like the public folder of the laravel default file system)
.htaccess
the .htaccess content:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} anotherAppDomainAtSharedServer$ [NC]
RewriteCond %{REQUEST_URI} !/.*$
RewriteRule ^(.*)$ /$1 [L]
RewriteCond %{HTTP_HOST} laravelAppDomain$ [NC]
RewriteCond %{REQUEST_URI} !^/laravel-frontend/.*$
RewriteRule ^(.*)$ /laravel-frontend/$1 [L]
</IfModule>
index.php inside laravel-frontend:
require __DIR__.'/../laravel-backend/bootstrap/autoload.php';
$app = require_once __DIR__.'/../laravel-backend/bootstrap/app.php';
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
$response = $kernel->handle(
$request = Illuminate\Http\Request::capture()
);
$response->send();
$kernel->terminate($request, $response);
and the routes.php
Route::get('/', function () {
return view('index');
});
Route::group(['prefix' => 'api/v1'], function(){
Route::resource('authenticate', 'AuthenticateController', ['only' => ['index']]);
Route::post('authenticate', 'AuthenticateController@authenticate');
....
So, as i said, i can see login page, but when i want to login i get 404 error
http://laravelAppDomain/laravel-backend/api/v1/authenticate 404 (Not Found)
NotFoundHttpException in RouteCollection.php line 161:
any clue? any configuration i miss?
In addition, i have not access to configuration server, i mind i can't edit etc folder hosts, vhosts or similar like i did in my local environment.