简体   繁体   English

在我的FuelPHP模块的服务器上找不到URL

[英]URL cannot be found on the server for my FuelPHP Module

I'm creating a small FuelPHP application that contains a blog module. 我正在创建一个包含博客模块的小型FuelPHP应用程序。 In this module the posts controller just assigns a simple view to the template for the posts index. 在此模块中,posts控制器仅将简单视图分配给posts索引的模板。

I have read through the FuelPHP docs and have the following settings in the app config for the modules: 我已经阅读了FuelPHP文档,并在模块的应用程序配置中具有以下设置:

'module_paths' => array(
    APPPATH.'modules'.DS,
    APPPATH.'..'.DS.'globalmods'.DS
),

'always_load' => array(
    'packages' => array(
        'auth',
        'orm',
    ),
    'modules' => array(
        'admin',
        'blog',
    ),
),

The application itself is outside my WAMP www docroot but the assets, htaccess and index.php are inside. 该应用程序本身在我的WAMP www docroot之外,但资产,htaccess和index.php在其中。

I have no idea why the server cannot find the localhost/blog/posts/index URL as I have followed everything advised on the docs and the homepage ( root route) seems to display fine. 我不知道为什么服务器找不到localhost / blog / posts / index URL,因为我遵循了文档中建议的所有内容,并且主页( 路由)似乎显示正常。 It is only when I click the blog link (blog/posts/index) that it states 只有当我单击博客链接(blog / posts / index)时,它才会指出

"Not Found “未找到

The requested URL /blog/posts/index was not found on this server." 在此服务器上找不到请求的URL / blog / posts / index。”

Any help would be much appreciated! 任何帮助将非常感激!

I had the same problem myself. 我自己也有同样的问题。 Two key things I did were: 我做的两件事是:

1) Start with a fresh copy of Fuel. 1)从全新的Fuel开始。 I was missing some sort of configuration file, so I create a brand new Fuel framework, and then added all the app files back in 我缺少某种配置文件,因此我创建了一个全新的Fuel框架,然后将所有应用程序文件重新添加到

2) Enabling the 'rewrite_module' in the Apache Modules (in the Wampserver config) 2)在Apache模块中启用“ rewrite_module”(在Wampserver配置中)

Try these two things and see what you get. 尝试这两件事,看看会得到什么。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM