I have a main wordpress installed on the root and now due to a long story about incompatible plugins I need to install a second full instance of wordpress in a subdirectory.
The main site works fine, as does the site in the subdirectory. As long as I don’t activate pretty permalinks on the subsite
Once the subsite has permalinks on only the home page is accessible, any other page is captured by the main install that spits out a 404.
I have the following on my main .htaccess (in the root folder of the site)
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^domain.com
RewriteRule (.*) http://www.domain.com/$1 [R=301,L]
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
<Directory /path/to/subdir>
RewriteEngine On
RewriteBase /subdir/
RewriteRule ^index.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /subdir/index.php [L]
</Directory>
And this is the content of the .htaccess that resides in the subfolder
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /subdir/
RewriteRule ^index.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /subdir/index.php [L]
</IfModule>
# END WordPress
I thought that either the .htaccess in the subdirectory or the <Directory>
directive in the main .htaccess would work. I’m clueless at this point.