hey guys im new to laravel then im starting to access the home using
Route::get('/home', function()
{
//return 'foo';
return View::make('hello');
});
with url: http://web.learninglaravel.dev/home, before with this url i can access the home with route '/' without using the php artisan serve. Im using ubuntu 12.04. and my directory is like this
because im using mod_vhost_alias
and the browser gives me this
please help because im a newbie in laravel. tnx in advanced..
Either remove or add the / on index.php.
Without
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
With
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ /index.php [L]
</IfModule>
You need to remove the "/" from "/home". Just "home" will fix this.
Code:
Route::get('home', function()
{
//return 'foo';
return View::make('hello');
});
I've made this mistake once or twice :)
Make sure you have configured your url (or virtual host if you have created one) to point to the public folder.
If you have done that and you still can't access the folder change the permissions to allow www-data access.
Run this command on the folder :
sudo chgrp -R www-data foldername
You might also have to change permissions to the storage folder once you get this phase working.