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 folderpublic
of its application, would solve the problem– Amanda Lima
@Amandalima a Document root esta sendo usada pelo site e esta aplicação tem que ficar dentro de uma pasta na public, understood?
– RFL
Which server operating system?
– Amanda Lima
@Amandalima Ubuntu 14.04
– RFL
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
– Amanda Lima
@Amandalima is not quite what I need, as I said, I do not want to change the default access of public_html
– RFL
@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.
– Raylan Soares