pyrocms安装在子目录中,wordpress安装在根目录中

发布于 2024-09-25 17:41:02 字数 1504 浏览 1 评论 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 的“community”目录。这是我在社区子目录中的 .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_proticol 的不同设置,我会得到奇怪的结果。数据库连接错误等。我已经能够显示安装程序的主页,但没有其他步骤。

有什么想法吗?尚未找到任何为子目录安装正确配置 Pyrocms 的文档。

Been at this for a while, so I figured I'd ask for help. Here's the .htaccess file for wordpress in the root:

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

I'm basically asking it to ignore the "community" directory, where pyrocms will be installed. Here's my .htaccess file in the community subdir:

<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>

I get a 404 (the CI 404) when I try to access /community/installer

Additionally, if i try different settings for uri_proticol, I get weird results. db connection errors, etc. I've been able to get the main page of the installer to show, but no steps past that.

Any thoughts? Haven't found any docs for properly configuring pyrocms for a subdirectory installation.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

黎歌 2024-10-02 17:41:02

恢复您的 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>

希望有所帮助。

Restore your WordPress .htaccess (delete it, and regenerate it from the permalinks option in the panel).

Now, change your /community/.htaccess to this,

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

Hope that helps.

旧城烟雨 2024-10-02 17:41:02

你到底为什么这么做?

我可能制作了 PyroCMS,但我拒绝支持这样的精神事物;-)

What the hell are you doing that for?!

I may have made PyroCMS but I refuse to support something as mental as that ;-)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文