• <bdo id='KR0ix'></bdo><ul id='KR0ix'></ul>

      <small id='KR0ix'></small><noframes id='KR0ix'>

      <legend id='KR0ix'><style id='KR0ix'><dir id='KR0ix'><q id='KR0ix'></q></dir></style></legend>
      <tfoot id='KR0ix'></tfoot>
      1. <i id='KR0ix'><tr id='KR0ix'><dt id='KR0ix'><q id='KR0ix'><span id='KR0ix'><b id='KR0ix'><form id='KR0ix'><ins id='KR0ix'></ins><ul id='KR0ix'></ul><sub id='KR0ix'></sub></form><legend id='KR0ix'></legend><bdo id='KR0ix'><pre id='KR0ix'><center id='KR0ix'></center></pre></bdo></b><th id='KR0ix'></th></span></q></dt></tr></i><div id='KR0ix'><tfoot id='KR0ix'></tfoot><dl id='KR0ix'><fieldset id='KR0ix'></fieldset></dl></div>
      2. Laravel 快速入门指南路线不起作用

        Laravel quick start guide route not working(Laravel 快速入门指南路线不起作用)
      3. <i id='Fa6YN'><tr id='Fa6YN'><dt id='Fa6YN'><q id='Fa6YN'><span id='Fa6YN'><b id='Fa6YN'><form id='Fa6YN'><ins id='Fa6YN'></ins><ul id='Fa6YN'></ul><sub id='Fa6YN'></sub></form><legend id='Fa6YN'></legend><bdo id='Fa6YN'><pre id='Fa6YN'><center id='Fa6YN'></center></pre></bdo></b><th id='Fa6YN'></th></span></q></dt></tr></i><div id='Fa6YN'><tfoot id='Fa6YN'></tfoot><dl id='Fa6YN'><fieldset id='Fa6YN'></fieldset></dl></div>
        • <bdo id='Fa6YN'></bdo><ul id='Fa6YN'></ul>
        • <small id='Fa6YN'></small><noframes id='Fa6YN'>

            <tbody id='Fa6YN'></tbody>
          <tfoot id='Fa6YN'></tfoot>

                • <legend id='Fa6YN'><style id='Fa6YN'><dir id='Fa6YN'><q id='Fa6YN'></q></dir></style></legend>
                  本文介绍了Laravel 快速入门指南路线不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  好的,我是 Laravel 的新手,所以直接阅读文档开始.文档中存在大量漏洞,因此需要花费大量精力和谷歌搜索来填补空白,以便设置 Laravel.我现在已经设置好它并进入快速入门指南中的下一步.我创建了我的路线

                  Ok I'm new to Laravel so went straight to the documentation to get started. There are massive holes in the documentation so it took a lot of effort and googling to fill the gaps in order to get Laravel set-up. I now have it set up and moved on to the next step in the quick start guide.I created my route

                  Route::get('users', function()
                  {
                       return 'Users!';
                  });
                  

                  现在它说:

                  Now, if you hit the /users route in your web browser, you should see Users!
                  

                  所以我打了起来:

                  http://localhost/laravel/users 
                  

                  但是得到一个 404?我试过了

                  but get a 404? I tried

                  http://localhost/laravel/public/users 
                  

                  但仍然是 404?我按照这封信的快速入门指南中的步骤操作,我错过了什么?

                  but still a 404? I followed the steps on the quick start guide to the letter, what am I missing?

                  推荐答案

                  看起来你的 Laravel 应用可以通过 Apache HTTP 别名访问,因为你的 URL 看起来像:http://localhost/laravel/.如果是这种情况并假设 http://localhost/laravel 指向您的公共目录,请按照以下步骤操作:

                  Seems like your Laravel app is accesible via an Apache HTTP alias, because your URL looks like: http://localhost/laravel/. If this is the case and assuming that http://localhost/laravel is pointing to your public directory, then follow these steps:

                  1. 尝试使用 /index.php/ 导航到您预期的路线,在您的情况下:http://localhost/laravel/index.php/users.如果它有效(没有 404),那么您的问题在于 Apache HTTP 的重写模块配置,您应该按照以下步骤操作.
                  2. 编辑文件public/.htaccess.
                  3. RewriteEngine On 行下添加 RewriteBase/laravel/.
                  4. 尝试导航到现有路线.
                  1. Try to navigate to your expected route prepend it with /index.php/, in your case: http://localhost/laravel/index.php/users. If it works (no 404) then you problem is with the Rewrite Module configuration of Apache HTTP, you should follow the next steps.
                  2. Edit the file public/.htaccess.
                  3. Under the line RewriteEngine On add RewriteBase /laravel/.
                  4. Try to navigate to an existing route.

                  基本上,如果您的应用程序驻留在别名或虚拟目录中(例如 http://localhost/alias),您应该在重写规则中添加一个条目来重写 基本目录 带有 别名.

                  Basically, if you app resides in a alias or virtual directory (say http://localhost/alias) you should add an entry in your rewrite rule to rewrite the base directory with alias.

                  这篇关于Laravel 快速入门指南路线不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Laravel 4 - Connect to other database(Laravel 4 - 连接到其他数据库)
                  Call external API function from controller, LARAVEL 4(从控制器调用外部 API 函数,LARAVEL 4)
                  Empty string instead of null values Eloquent(空字符串而不是空值 Eloquent)
                  quot;laravel.logquot; could not be opened: failed to open stream(“laravel.log无法打开:无法打开流)
                  Displaying the Error Messages in Laravel after being Redirected from controller(从控制器重定向后在 Laravel 中显示错误消息)
                  Laravel Creating Dynamic Routes to controllers from Mysql database(Laravel 从 Mysql 数据库创建到控制器的动态路由)

                • <small id='J1HTy'></small><noframes id='J1HTy'>

                        <tbody id='J1HTy'></tbody>

                        <i id='J1HTy'><tr id='J1HTy'><dt id='J1HTy'><q id='J1HTy'><span id='J1HTy'><b id='J1HTy'><form id='J1HTy'><ins id='J1HTy'></ins><ul id='J1HTy'></ul><sub id='J1HTy'></sub></form><legend id='J1HTy'></legend><bdo id='J1HTy'><pre id='J1HTy'><center id='J1HTy'></center></pre></bdo></b><th id='J1HTy'></th></span></q></dt></tr></i><div id='J1HTy'><tfoot id='J1HTy'></tfoot><dl id='J1HTy'><fieldset id='J1HTy'></fieldset></dl></div>
                          <bdo id='J1HTy'></bdo><ul id='J1HTy'></ul>
                          <tfoot id='J1HTy'></tfoot>

                            <legend id='J1HTy'><style id='J1HTy'><dir id='J1HTy'><q id='J1HTy'></q></dir></style></legend>