pyrocms安装在子目录中,wordpress安装在根目录中
从事这个工作有一段时间了,所以我想我会寻求帮助。这是根目录中 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
恢复您的 WordPress .htaccess(将其删除,然后从面板中的永久链接选项重新生成)。
现在,将您的 /community/.htaccess 更改为此,
希望有所帮助。
Restore your WordPress .htaccess (delete it, and regenerate it from the permalinks option in the panel).
Now, change your /community/.htaccess to this,
Hope that helps.
你到底为什么这么做?
我可能制作了 PyroCMS,但我拒绝支持这样的精神事物;-)
What the hell are you doing that for?!
I may have made PyroCMS but I refuse to support something as mental as that ;-)