admin管理员组文章数量:1410688
I have a main WordPress installation, with this (normal) .htaccess
:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
And I have a different WP installation under /conekt
, with this .htaccess
:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /conekt/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /conekt/index.php [L]
</IfModule>
Each have their own db, and each point to the root
and root/conekt
folders respectively.
(Edit: I actually found this to be incorrect: The main WP works fine).
The subfolder WP front page and admin both work fine, but none of the front-end links (of the subfolder WP) work, with a custom permalink set to [root/conekt/]%postname%
.
I've tried resetting permalinks for the subfolder WP, but still no go. What am I doing wrong? Do I need to catch all calls for /conekt/
in the .htaccess
from root? If so, how? I'm not an expert in .htaccess
rules.
I've already browsed through these questions, but haven't been able to find an answer for my problem in any of them:
- Wordpress within a subdirectory of another Wordpress environment doesn't work
- Permalinks not working on second wordpress installed in a subdirect
Update: Everything works perfectly when I select default permalinks for the WP inside the folder. Links only stop working when I try to use pretty permalinks (which is what is desired).
I have a main WordPress installation, with this (normal) .htaccess
:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
And I have a different WP installation under /conekt
, with this .htaccess
:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /conekt/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /conekt/index.php [L]
</IfModule>
Each have their own db, and each point to the root
and root/conekt
folders respectively.
(Edit: I actually found this to be incorrect: The main WP works fine).
The subfolder WP front page and admin both work fine, but none of the front-end links (of the subfolder WP) work, with a custom permalink set to [root/conekt/]%postname%
.
I've tried resetting permalinks for the subfolder WP, but still no go. What am I doing wrong? Do I need to catch all calls for /conekt/
in the .htaccess
from root? If so, how? I'm not an expert in .htaccess
rules.
I've already browsed through these questions, but haven't been able to find an answer for my problem in any of them:
- Wordpress within a subdirectory of another Wordpress environment doesn't work
- Permalinks not working on second wordpress installed in a subdirect
Update: Everything works perfectly when I select default permalinks for the WP inside the folder. Links only stop working when I try to use pretty permalinks (which is what is desired).
Share Improve this question edited Jan 25, 2020 at 19:38 feetwet 1712 silver badges17 bronze badges asked Jul 11, 2016 at 16:47 taotao 9856 silver badges16 bronze badges 2- Have you considered using a multi-site approach? Or viewing the Installing Multiple Blogs form the codex? – Greg McMullen Commented Jul 11, 2016 at 17:32
- @GregMcMullen I haven't. If this doesn't work, I'll try it, thank you. However, I don't see any point in a multisite installation, since I don't want to use the same database and no data is shared between the two. – tao Commented Jul 11, 2016 at 17:39
1 Answer
Reset to default 3It was a server missconfiguration in httpd.conf
:
<Directory />
AllowOverride None
</Directory>
had to be changed in AllowOverride All
. I should have realized this sooner, but it eluded me since I thought the override was working on the main installation, but it wasn't. I didn't notice it, because it was a one-page website. Once I turned AllowOverride
on, they both started working.
First impulse was to delete the question, but than I thought it might help other people pulling their hair out, like I was.
Again, thank you for your time to everyone who read this.
本文标签: directoryhtaccess for wordpress inside another wordpress install
版权声明:本文标题:directory - .htaccess for wordpress inside another wordpress install 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744804860a2626083.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论