路由访问不了
我在routes.php里写得路由访问不了怎么回事啊老师? 把他原来自带得路由原先是‘/’可以访问,但是改下名字也不行了。。才入坑求解
The requested URL /php/laravel/public/member/info was not found on this server.
我在routes.php里写得路由访问不了怎么回事啊老师? 把他原来自带得路由原先是‘/’可以访问,但是改下名字也不行了。。才入坑求解
The requested URL /php/laravel/public/member/info was not found on this server.
2018-04-18
你是什么环境的,我之前遇到过这种问题,我是 nginx 的环境,要修改nginx的配置文件就可以了
server { listen 80; server_name test.laravel.local; access_log /home/wwwroot/default/logs/access_laravel.log; error_log /home/wwwroot/default/logs/error_laravel.log; root /home/wwwroot/default/laravel5/public; index index.html; location / { index index.php; try_files $uri $uri/ /index.php?$query_string; if (!-e $request_filename) { rewrite ^/(.*)$ /index.php/$1 last; break; } } location ~ .+\.php($|/) { set $script $uri; set $path_info "/"; if ($uri ~ "^(.+\.php)(/.+)") { set $script $1; set $path_info $2; } fastcgi_pass unix:/tmp/php-cgi.sock; fastcgi_index index.php?IF_REWRITE=1; include fastcgi_params; fastcgi_param PATH_INFO $path_info; fastcgi_param SCRIPT_FILENAME $document_root/$script; fastcgi_param SCRIPT_NAME $script; } }
举报