jeudi 5 mai 2016

New to Laravel - Route does not work

I just started learning Laravel from this series: http://ift.tt/1uTbdSB

I use windows 10 with Wamp.

My site sits under: sites/highland.lar

I created the virtual host.

The route has this code:

Route::get('/', function () { return view('welcome'); });

When I go to: http::highland.lar I get the page: Index of/ instead of the Welcome.blade.php view.

I added an index.php file to the root folder to test, and this file works fine.

After installing laravel the public/htaccess looked like:

<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
       Options -MultiViews
    </IfModule>

    RewriteEngine On

    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)/$ /$1 [L,R=301]

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]

    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>

Reading this link: enter link description here I changed it to:

Options +FollowSymLinks
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

Nothing helps. What am I doing wrong?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1OfmFzl
via IFTTT

Aucun commentaire:

Enregistrer un commentaire