Php 简单路线不起作用

Php 简单路线不起作用,php,laravel,laravel-4,Php,Laravel,Laravel 4,大家好,下面是我为laravelroutes.php编写的代码 Route::get('/', function() { return View::make('index'); }); Route::get('bid', function() { return View::make('bid'); }); 对于http://localhost/supadmin/public/但不适用于http://l

大家好,下面是我为laravel
routes.php编写的代码

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

    Route::get('bid', function()
    {
      return View::make('bid');
    });
对于
http://localhost/supadmin/public/
但不适用于
http://localhost/supadmin/public/bid
,可能是什么问题??我收到一个错误
在此服务器上找不到请求的URL/supadmin/public/bid。
我还将
配置为.htaccess

Options +FollowSymLinks
        RewriteEngine On

        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^ index.php [L]
它可以像这样工作
http://localhost/supadmin/public/index.php/bid
但我希望它能工作
http://localhost/supadmin/public/bid

php artisan路由
显示

+--------+--------------------------+-------------+---------+----------------+---------------+
| Domain | URI                      | Name        | Action  | Before Filters | After Filters |
+--------+--------------------------+-------------+---------+----------------+---------------+
|        | GET|HEAD /               |             | Closure |                |               |
|        | GET|HEAD bid             |             | Closure |                |               |
|        | GET|HEAD bid_history     | bid_history | Closure |                |  
你需要出价

Route::get('/bid', function()
    {
      return View::make('bid');
});
请确保使用php artisan routes注册路由

并尝试通过php artisan serve提供服务

编辑

您还应该尝试检查apache设置

将以下代码添加到/etc/apache2/sites available/default

AllowOverride All

重新启动apache

顺序错误。试试这个:

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

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

您需要启用Apache模块
mod\u rewrite

要启用mod_重写,请执行以下操作:

a2enmod rewrite
然后重新启动Apache:

service apache2 restart

你犯了什么错误?@Zander Rootman我用错误消息更新了问题。。谢谢..在
上的重写引擎之后尝试使用
RewriteBase/supadmin/public
。使用php artisan服务和检查服务应用程序,也尝试使用php artisan路由。它是否显示there@Saqueib我现在在发球。。这需要花费一些时间…现在它可以在
localhost:8000/bid
@Friend中正常工作总是在开发中使用serve或setup virtualhost。它有什么不同?因为搜索算法,它可以产生不同