douketangyouzh5219 2015-04-28 15:41
浏览 23
已采纳

路由到/ Laravel 4外的目录

i installed a project on my www folder in wamp , but when i add new route and try to get it wil the browser i got page not found , i copied all laravel 4 files to local folder exclude publi folder and i put its content on www , and try my route , i got the same error :

the routes :

<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the Closure to execute when that URI is requested.
|
*/

Route::get('/', function()
{
    return View::make('hello');
});

Route::get('about', function()
{
    return View::make('hello');
});

when i get to " localhost " , it works fine but when i get to " localhost/about" i got page not found and i modified paths and index files and same issue

  • 写回答

2条回答 默认 最新

  • duancha1065 2015-04-28 16:49
    关注

    you can enable rewrite_mod :

    Open the httpd.conf file and search for

    "rewrite"
    

    , then remove

    "#"
    

    at the starting of the line,so the line looks like.

    LoadModule rewrite_module modules/mod_rewrite.so

    then restart the wamp.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 metadata提取的PDF元数据,如何转换为一个Excel
  • ¥15 关于arduino编程toCharArray()函数的使用
  • ¥100 vc++混合CEF采用CLR方式编译报错
  • ¥15 coze 的插件输入飞书多维表格 app_token 后一直显示错误,如何解决?
  • ¥15 vite+vue3+plyr播放本地public文件夹下视频无法加载
  • ¥15 c#逐行读取txt文本,但是每一行里面数据之间空格数量不同
  • ¥50 如何openEuler 22.03上安装配置drbd
  • ¥20 ING91680C BLE5.3 芯片怎么实现串口收发数据
  • ¥15 无线连接树莓派,无法执行update,如何解决?(相关搜索:软件下载)
  • ¥15 Windows11, backspace, enter, space键失灵