亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

路由訪問不了

我在routes.php里寫得路由訪問不了怎么回事啊老師? 把他原來自帶得路由原先是‘/’可以訪問,但是改下名字也不行了。。才入坑求解


The requested URL /php/laravel/public/member/info was not found on this server.



正在回答

2 回答

你沒有URL重寫,就是把入口文件省略做配置。如果沒配置的話,每一個URL都加上index.php的入口文件。

0 回復 有任何疑惑可以回復我~

你是什么環境的,我之前遇到過這種問題,我是 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;
????}
}


1 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

路由訪問不了

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號