Laravel on dedicated server

Asked

Viewed 97 times

0

I’m trying to install the laravel in a subfolder within public_html, inside the folder where the application is .htaccess.

<IfModule mod_rewrite.c>
   RewriteEngine on
   RewriteCond %{REQUEST_URI} !^public
   RewriteRule ^(.*)$ public/$1 [L]
</IfModule>

Only now when access through the URL I only get the error;

NotFoundHttpException in RouteCollection.php line 161:

I checked in my route file if the path was correct and this.

Route::get('/', ['as' => 'dashboard.login', function() {
  return view('dashboard.auth.login');
}]);

I managed to enter the "error", I can only access the application if I put /public after domination, but I’m using this .htaccess I commented above and he should remove this "public" correct?

  • You can set the document root from Apache to the folder public of its application, would solve the problem

  • @Amandalima a Document root esta sendo usada pelo site e esta aplicação tem que ficar dentro de uma pasta na public, understood?

  • Which server operating system?

  • @Amandalima Ubuntu 14.04

  • 1

    You can find a detailed answer : http://answall.com/questions/14150/como-alterar-a-pasta-www-documentroot-para-outra-parti%C3%A7%C3%A3o-no-apache-2-4-ubunt

  • @Amandalima is not quite what I need, as I said, I do not want to change the default access of public_html

  • @Rafaelacioly I usually don’t even change the . htaccess, I simply change the redirect to the public of the Switch in the hosting panel. For example from "public_html" to "public_html/my/public application". So when they access the domain or subdomain I pointed out it already works right.

Show 2 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.