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.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744804861a4594711.html
评论列表(0条)