doubi4531
doubi4531
2015-03-22 09:33
浏览 65
已采纳

为什么我得到了laravel NotFoundHttpException?

I have successfully cloned a laravel from a git repo into a new folder, and I have successfully run database migrations& seeds.

I also deleted vendor folder, and run: $composer install --dev

Although my routes.php is simple:

<?php

Route::get('/', 'BlogController@getIndex');

I try to visit my page as:

http://localhost:8080/widgets-repository-contribution%20/public/

I get this error:

Symfony \ Component \ HttpKernel \ Exception \ NotFoundHttpException

I also tried to restart the server, but no luck .. Any idea?

for full trace:

Server/Request Data
REDIRECT_OPENSSL_CONF   C:\Bitnami\wampstack-5.4.37-0/apache2/conf/openssl.cnf
REDIRECT_PATH   C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\jZip;C:\HaxeToolkit\haxe\;C:\HaxeToolkit
eko;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Bitnami\wampstack-5.4.37-0\php;C:\ProgramData\ComposerSetup\bin;;C:\Bitnami\wampstack-5.4.37-0/apache2/bin;
REDIRECT_STATUS 200
OPENSSL_CONF    C:\Bitnami\wampstack-5.4.37-0/apache2/conf/openssl.cnf
PATH    C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\jZip;C:\HaxeToolkit\haxe\;C:\HaxeToolkit
eko;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Bitnami\wampstack-5.4.37-0\php;C:\ProgramData\ComposerSetup\bin;;C:\Bitnami\wampstack-5.4.37-0/apache2/bin;
HTTP_HOST   localhost:8080
HTTP_CONNECTION keep-alive
HTTP_CACHE_CONTROL  max-age=0
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
HTTP_USER_AGENT Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.89 Safari/537.36
HTTP_ACCEPT_ENCODING    gzip, deflate, sdch
HTTP_ACCEPT_LANGUAGE    ar,en-US;q=0.8,en;q=0.6
HTTP_COOKIE laravel_session=eyJpdiI6Inp0ZnZOZDhIcFFKS2FBejZNeEthNlE9PSIsInZhbHVlIjoiVHlKUzI2bkFrZGhkS0lFRXdqMEMrUUNXRWNcL2JORnY5OVVmOHF1d0NrbXE4K21zMkVabFpNMXFyN0Vhb2U1ZXVMVmlDUUpHZUMzV0hYUzExUnVlVGVBPT0iLCJtYWMiOiI2YjMzZTlkMTNmNjhhNmVmNjY3NDYxYTEwZjYzNWNmNjY2N2RjYjE5NWEwODgzMzY1NTMzZjZjMjZkNzRmMTg5In0%3D
SystemRoot  C:\Windows
COMSPEC C:\Windows\system32\cmd.exe
PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
WINDIR  C:\Windows
SERVER_SIGNATURE    
SERVER_SOFTWARE Apache
SERVER_NAME localhost
SERVER_ADDR ::1
SERVER_PORT 8080
REMOTE_ADDR ::1
DOCUMENT_ROOT   C:/Bitnami/wampstack-5.4.37-0/apache2/htdocs
REQUEST_SCHEME  http
CONTEXT_PREFIX  
CONTEXT_DOCUMENT_ROOT   C:/Bitnami/wampstack-5.4.37-0/apache2/htdocs
SERVER_ADMIN    admin@example.com
SCRIPT_FILENAME C:/Bitnami/wampstack-5.4.37-0/apache2/htdocs/widgets-repository-contribution/public/index.php
REMOTE_PORT 57801
REDIRECT_URL    /widgets-repository-contribution /public/
GATEWAY_INTERFACE   CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD  GET
QUERY_STRING    
REQUEST_URI /widgets-repository-contribution%20/public/
SCRIPT_NAME /widgets-repository-contribution/public/index.php
PHP_SELF    /widgets-repository-contribution/public/index.php
REQUEST_TIME_FLOAT  1427016178.277
REQUEST_TIME    1427016178
  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • dongtuo3370
    dongtuo3370 2015-03-22 09:58
    已采纳

    "public" is not part of the url and space (%20) in url is also strange. You must access http://localhost:8080/widgets-repository-contribution

    php artisan route:list will show you all routes that have been correctly defined for doublechecking.

    点赞 评论

相关推荐