【问题标题】:How to configure htaccess zf2 in subdomain of shared hosting如何在共享主机的子域中配置 htaccess zf2
【发布时间】:2014-09-13 14:21:41
【问题描述】:

我试图在我的共享托管服务器的子域中托管 zf2 框架,但它给出了 404- 未找到错误。这是我当前的文件结构。

为了将其指向公共文件夹,我在 htaccess 中使用了以下代码(放置在子域(abc)的根目录中

Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteBase /abc/

RewriteCond %{REQUEST_URI} !/public [NC]
RewriteRule ^(.*)$ public/$1 [L]

如果主网站是www.example.com,我将能够得到我的子域网站为abc.example.com 请指教..

【问题讨论】:

    标签: .htaccess zend-framework2 subdomain shared-hosting


    【解决方案1】:

    只需按照我在以下问题中的回复中的说明进行操作即可

    ZF2 in shared hosting

    这只能通过使用 abc.example.com 而不是 www.example.com/abc 访问站点来工作

    【讨论】:

      猜你喜欢
      • 2011-12-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-04-12
      • 2013-02-12
      • 2019-01-28
      • 2018-11-29
      • 1970-01-01
      相关资源
      最近更新 更多