【问题标题】:EzPublish does not find his routesEzPublish 没有找到他的路线
【发布时间】:2016-03-21 13:00:51
【问题描述】:

我已经安装了ez publish(版本:community 15.09,系统:apache)。

我已将它安装在我的 public_html 目录中,公共目录是 public_html/web

我可以通过这个 URL 访问演示页面:

domain.com/

或者用这个(两个版本)

domani.com/index.php

但如果我尝试另一条路线,像这样:

domain.com/ez

它不起作用(服务器回复:The requested URL /ez was not found on this server.),只有当我在路由中包含索引时才起作用:

domain.com/index.php/ez

我搜索了但什么也没找到... 为什么这个? 如何解决?

【问题讨论】:

    标签: php symfony routing ezpublish ezplatform


    【解决方案1】:

    你要做的基本上是url重写。

    你有两种方法可以做到这一点:

    1. 在 Apache 端启用 mod_rewrite 并应用类似于this template 的虚拟主机配置。确保将占位符 (%STUFF%) 替换为正确的值。

    2. 在您的 public_html/web 文件夹中使用 .htaccess 文件:查看example here

    注意:能够使用 .htaccess 需要您的 apache 配置允许它。它通常是您的 <Directory /path/to/public_html/web>directive 的 AllowOverride None|All|... 部分:请参阅 Apache Documentation here

    【讨论】:

    • 我认为是url重写的问题,我也创建了一个htaccess,但没有奏效,所以我认为可能是其他一些或者我的htaccess太简单了,无论如何我解决了那个htaccess (解决方案2)!谢谢
    猜你喜欢
    • 2011-06-14
    • 1970-01-01
    • 2022-12-07
    • 1970-01-01
    • 2016-04-04
    • 1970-01-01
    • 2011-01-14
    • 1970-01-01
    • 2014-04-22
    相关资源
    最近更新 更多