【问题标题】:fuelphp htaccess for multiple app directory not working多个应用程序目录的fuelphp htaccess不起作用
【发布时间】:2012-12-02 16:58:07
【问题描述】:

我的目录结构如下。

public_html/
       /abc/
       /xyz/
       /pqr/

在abc,xyz,pqr这几个目录下都有一个index.php。

现在只要有任何像domain.com/abc/def/ghi 这样的请求都应该重写为domain.com/abc/index.php/def/ghi

domain.com/xyz/def/ghi => domain.com/xyz/index.php/def/ghi
domain.com/pqr/def/ghi => domain.com/pqr/index.php/def/ghi

.htaccess 文件应该是什么,应该放在哪里?

我在每个目录(abc,xyz,pqr)中都有 .htaccess 文件,如下所示,但它不起作用。它显示 404 页面未找到。请指导我处理所有这些重写条件。

<IfModule mod_rewrite.c>
    RewriteEngine on

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d

    RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

但这不起作用...如果这是正确的 .htaccess 那么请告诉我是否还有其他服务器端问题。我在 CentOs 服务器上设置这个。

【问题讨论】:

    标签: .htaccess mod-rewrite fuelphp


    【解决方案1】:

    您可能需要RewriteBase /abc 来处理子文件夹。

    【讨论】:

      【解决方案2】:

      我的目录访问有问题,我需要更新 apache 配置文件(httpd.conf)中内容目录(domain.com)的访问权限

      【讨论】:

        猜你喜欢
        • 2012-01-26
        • 1970-01-01
        • 2012-03-23
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2011-10-13
        • 2020-08-16
        相关资源
        最近更新 更多