.htaccess for wordpress inside another wordpress install

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 rootand 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).

1 Answer
1

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

Leave a Comment