0

有一段时间了,所以我想我会寻求帮助。这是根目录中 wordpress 的 .htaccess 文件:

AddHandler x-httpd-php5 .php
AddHandler x-httpd-php .php4

# BEGIN WordPress


<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

RewriteCond $1 !^(community)(/|$)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

我基本上要求它忽略将安装 pyrocms 的“社区”目录。这是我在社区子目录中的 .htaccess 文件:

<IfModule mod_rewrite.c>

 Options +FollowSymLinks
 RewriteEngine on

 # NOTICE: If you get a 404 play with combinations of the following commented out lines
 #AllowOverride All
 RewriteBase /community

 # Restrict your site to only one domain
 #RewriteCond %{HTTP_HOST} !^example\.com$
 #RewriteRule ^(.*)$ http://example.com/$1 [L]

 # Keep people out of codeigniter directory and Git/Mercurial data
 RedirectMatch 403 ^/(system\/pyrocms\/cache|system\/codeigniter|\.git|\.hg).*$

 # Send request via index.php (again, not if its a real file or folder)
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d

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

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

</IfModule>

当我尝试访问 /community/installer 时收到 404(CI 404)

此外,如果我为 uri_protocol 尝试不同的设置,我会得到奇怪的结果。db 连接错误等。我已经能够显示安装程序的主页,但没有任何步骤。

有什么想法吗?尚未找到任何用于正确配置 pyrocms 以进行子目录安装的文档。

4

2 回答 2

0

恢复您的 WordPress .htaccess(删除它,然后从面板中的永久链接选项重新生成它)。

现在,将您的 /community/.htaccess 更改为此,

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /community
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
</IfModule>

希望有帮助。

于 2010-09-28T17:59:02.533 回答
-1

你他妈这么做是为了什么?!

我可能制作了 PyroCMS,但我拒绝支持这种精神上的东西 ;-)

于 2010-09-29T15:57:18.120 回答